Skip to content

Commit

Permalink
misc: escape spec2006 testcase name
Browse files Browse the repository at this point in the history
  • Loading branch information
xieby1 committed Nov 11, 2024
1 parent a989d7a commit 1fa606f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ h

it will show you some usage tips
```
DETERMINISTIC_CHECKPOINTS USAGE TIPS
• Set SPEC CPU 2006 source code: edit config.nix : spec2006_path = [...]
DETERMINISTIC_CHECKPOINTS USAGE TIPS
• Set SPEC CPU 2006 source code: edit config.nix : spec2006_path = [...]
• Set input size: edit config.nix : size = xxx (default input is ref)
• Change other configs in config.nix
• Generate the checkpoints of all testCases into result/ : nom-build -A checkpoints
• Generate the checkpoints of a specific testCase into result/ : nom-build -A 'checkpoints."<testCase>"'
• E.g.: nom-build -A 'checkpoints."403.gcc"'
• Change other configs in config.nix
• Generate the checkpoints of all testCases into result/ : nom-build -A checkpoints
• Generate the checkpoints of a specific testCase into result/ : nom-build -A checkpoints.<testCase>
• E.g.: nom-build -A checkpoints.403_gcc
• Running nom-build without parameters will generate results-* directory containing all intermediate build results, symlinked to the corresponding /nix/store/....nix. You can then use dump_result.py to read the log files within and obtain the dynamic instruction count of the program.
• E.g.: nom-build
```
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ let
* Set input size: edit `config.nix`: `size = xxx` (default input is ref)
* Change other configs in `config.nix`
* Generate the checkpoints of all testCases into `result/`: `nom-build -A checkpoints`
* Generate the checkpoints of a specific <testCase> into `result/`: `nom-build -A 'checkpoints."<testCase>"'`
* E.g.: `nom-build -A 'checkpoints."403.gcc"'`
* Generate the checkpoints of a specific <testCase> into `result/`: `nom-build -A checkpoints.<testCase>`
* E.g.: `nom-build -A checkpoints.403_gcc`
* Running nom-build without parameters will generate results-* directory, used by dump_result.py
* E.g.: `nom-build`
* Generate html doc into `book/`: `make doc`,
Expand Down
3 changes: 2 additions & 1 deletion spec2006/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
};
in builtins.listToAttrs (
builtins.map (testcase: {
name = testcase;
# change `.` to `_`, e.g. "403.gcc" to "403_gcc"
name = builtins.replaceStrings ["."] ["_"] testcase;
value = runCommand "${testcase}" {} ''
mkdir -p $out
cp -r ${build-all}/${testcase}/* $out/
Expand Down

0 comments on commit 1fa606f

Please sign in to comment.