ARM-software / synchronization-benchmarks

Collection of synchronization micro-benchmarks and traces from infrastructure applications
Other
37 stars 36 forks source link

Lockhammer unittest and sweeptest #31

Closed zoybai closed 6 years ago

zoybai commented 6 years ago

By default, test_lockhammer.py will run unittest specified by lh_test_cfg.yaml

If all tests have been passed, test_lockhammer.py will return 0. Otherwise any failed test will trigger a non-zero return value.

geoffreyblake commented 6 years ago

Can one of the admins verify this patch?

rpgolshan commented 6 years ago

Traceback (most recent call last): File "/var/lib/jenkins/workspace/Build_and_Test_PR-31-JOSCI5ULR755CP4TYEF6YZ65KRMJNW6DBDQA7TRM62VOIMSIHOBA/benchmarks/lockhammer/scripts/test_lockhammer.py", line 307, in lhConfig = read_config(LH_CFG) File "/var/lib/jenkins/workspace/Build_and_Test_PR-31-JOSCI5ULR755CP4TYEF6YZ65KRMJNW6DBDQA7TRM62VOIMSIHOBA/benchmarks/lockhammer/scripts/test_lockhammer.py", line 60, in read_config with open(lhCfgStr, 'r') as fd: FileNotFoundError: [Errno 2] No such file or directory: 'lh_test_cfg.yaml'

zoybai commented 6 years ago

jenkins issue has been fixed in the latest patch

geoffreyblake commented 6 years ago

Log output for failing test: [Build_and_Test_PR-31-JOSCI5ULR755CP4TYEF6YZ65KRMJNW6DBDQA7TRM62VOIMSIHOBA] Running shell script

zoybai commented 6 years ago

Fixed path handling code:

Now by default the output lockhammer.csv file is a relative directory. It will be created in the working directory where lockhammer test script is executed.

The execute binary directory is also relative to where the unittest script is installed, just like config yaml file directory. We will prefix the absolute address of unittest python script file to the binary relative directory ../build

zoybai commented 6 years ago

Passed on Jenkins test: Stage Logs (Test) Shell Script -- git config --get remote.origin.url > .git/remote-url -- (self time 263ms) Read file from workspace (self time 9ms) Set GitHub commit status (universal) (self time 174ms) Shell Script -- /var/lib/jenkins/workspace/Build_and_Test_PR-31-JOSCI5ULR755CP4TYEF6YZ65KRMJNW6DBDQA7TRM62VOIMSIHOBA/benchmarks/lockhammer/scripts/test_lockhammer.py -- (self time 1min 42s) Shell Script -- git config --get remote.origin.url > .git/remote-url -- (self time 264ms) Read file from workspace (self time 14ms) Set GitHub commit status (universal) (self time 480ms)