aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
AgeCommit message (Collapse)AuthorFilesLines
2017-09-29Make ExamineTarget multi-core aware.Tim Newsome1-18/+23
Now on multi-core targets it only runs once, wasting less time.
2017-09-15Don't read entire log into RAM just to print it.Tim Newsome1-2/+1
2017-09-14misa is stored in the hart now, not the targetTim Newsome1-6/+6
2017-09-14When spike fails to launch, display its output.Tim Newsome1-21/+29
2017-09-14Call postMortem() when a test fails.Tim Newsome1-0/+10
2017-09-14Clarify timeout units.Tim Newsome1-0/+1
2017-09-01Add some infrastructure for multicore tests.Tim Newsome1-2/+2
When compiling, define the number of harts. This means we only need to allocate a lot of stack if there are a lot of harts.
2017-08-28Fix rebase bug.Tim Newsome1-1/+3
2017-08-28WIP multicore testing.Tim Newsome1-6/+20
2017-08-28WIP towards multiple gdb instances.Tim Newsome1-4/+14
2017-08-28Make the debug tests aware of multicore.Tim Newsome1-30/+65
Targets now contain an array of harts. When running a regular test, one hart is selected to run the test on while the remaining harts are parked in a safe infinite loop. There's currently only one test that tests multicore behavior, but there could be more. The infrastructure should be able to support heterogeneous multicore, but I don't have a target like that to test with.
2017-08-14Put logfile code back so everything works again.Tim Newsome1-2/+3
I don't exactly understand why it has to be the way it is, but I just want it to work. Also fix a pylint complaint.
2017-08-14debug: clean up Temporary Log File messagesMegan Wachs1-2/+2
2017-08-14debug: Avoid None type errorMegan Wachs1-1/+1
2017-08-14debug: Revert change to print backtrace, as that is actually already printedMegan Wachs1-2/+0
2017-08-14debug: Allow OpenOCD startup timeout to be specified. Print out path to log ↵Megan Wachs1-4/+5
files.
2017-08-14When a test fails with exception, actually print out the reason why.Megan Wachs1-0/+2
2017-08-11Show the OpenOCD log in all(?) failure cases.Tim Newsome1-23/+29
2017-08-11Print out name of logfile when debug test is run.Tim Newsome1-5/+5
2017-08-11When make fails to run a test, print out the log.Tim Newsome1-1/+4
2017-08-10Give these sim targets a chance of passing.Tim Newsome1-2/+4
Also make sure vsim.log makes it into the generated log file.
2017-07-27Make pylint happy.Tim Newsome1-2/+2
2017-07-26Use new OpenOCD messages to determine gdb port.Tim Newsome1-41/+8
This is simpler and more reliable than playing around with lsof. Specifically, it works if the OpenOCD command is "strace openocd" while the previous code did not.
2017-07-12Print out logs in more failure cases.Tim Newsome1-4/+10
2017-07-03Add gdb_setup to target for arbitrary gdb commandsTim Newsome1-0/+3
I'm using this for a target where misa is at an old address, to set riscv use_compressed_breakpoints off
2017-06-26Move target definition into individual files.Tim Newsome1-4/+5
Instead of defining each target in targets.py, now each target gets its own .py file. This means people can easily keep their own target files around that they may not want to put into the main test source. As part of that, I removed the freedom-u500-sim target since I assume it's only used internally at SiFive. Added a few cleanups as well: * Update README examples, mostly --sim_cmd instead of --cmd. * Allow defining misa in a target, to skip running of ExamineTarget. * Rename target.target() to target.create(), which is less confusing. * Default --sim_cmd to `spike` * Got rid of `use_fpu`, instead looking at F or D in $misa.
2017-06-22Add basic multicore test.Tim Newsome1-8/+29
2017-06-20Smoketest multicore.Tim Newsome1-5/+15
When connecting to gdb, select a random thread and use that for the current test. Also replace infinite_loop with something that will later allow smoketesting of more than one thread.
2017-06-19Write OpenOCD log when it crashes early.Tim Newsome1-2/+4
2017-06-16Store logs for all tests in logs/Tim Newsome1-30/+58
This creates a record of passing as well as failing tests, and gets rid of the log clutter that you previously ended up with in the current directory.
2017-06-15Test 64-bit addressing.Tim Newsome1-13/+16
The spike64 target now links all test programs at 0x7fff_ffff_ffff_0000. Also a minor change to log file naming so that 'make all' works again. I'll fix this better later.
2017-06-09Default to openocd, not riscv-openocdTim Newsome1-1/+1
AFAICT the normal build process never builds a binary called riscv-openocd.
2017-06-05Make pylint happy.Tim Newsome1-8/+10
If we want we can start using print(), but if so let's consistently use it instead of piecemeal. See also https://stackoverflow.com/questions/28694380/pylint-says-unnecessary-parens-after-r-keyword
2017-05-23Fail if simulator exits early.Richard Xia1-0/+6
2017-05-16debug: remove unused auto_int functionMegan Wachs1-3/+0
2017-05-16debug: Allow skipping the ExamineTarget task.Megan Wachs1-4/+9
2017-05-16debug: Allow skipping the ExamineTarget step by specifying misaMegan Wachs1-1/+8
2017-05-16Link the infinate loop at 0x10000000Palmer Dabbelt1-0/+2
Spike appears to have a problem geterating DTS at 0x80000000.
2017-05-15Disable another PRIV mention, for nowPalmer Dabbelt1-1/+2
2017-05-15Don't rely on Spike's default ISAPalmer Dabbelt1-1/+3
2017-05-15Let Spike have the default amount of RAMPalmer Dabbelt1-1/+0
Without this programs won't run.
2017-05-15debug: Use consistent 'sim_cmd' argument.Megan Wachs1-1/+1
2017-04-18debug: Don't halt out of reset. It's unrealistic. Use a program which loops ↵Megan Wachs1-2/+2
(actually it just gets an exception anyway).
2017-04-17debug: Checkpoint restoring Spike functionalityMegan Wachs1-11/+15
2017-04-17Merge remote-tracking branch 'origin/newprogram' into debug-0.13Megan Wachs1-7/+13
2017-04-14debug: checkpoint trying to get 64 bit programs to compile as well.Megan Wachs1-0/+3
2017-04-14debug: checkpoint of trying to get simulation tests workingMegan Wachs1-2/+5
2017-04-14debug: working with newprogram branchMegan Wachs1-5/+5
2017-03-03Print an error message when the OpenOCD config file can't be readPalmer Dabbelt1-1/+6
2017-02-24Add assert to save me from myself.Tim Newsome1-3/+3
spike passes the download test, but needs a 15 minute timeout. That's too ridiculous to put in here, but 60s is reasonable.