collect-traces.sh (649B)
1 #!/bin/bash 2 3 set -eu 4 5 trace_type=$1 6 implem=${IMPLEMENTATION:-ref} 7 8 if [ -f traces/${implem}/${trace_type}.patch ] 9 then 10 patch=traces/${implem}/${trace_type}.patch 11 else 12 patch=traces/${trace_type}.patch 13 fi 14 15 # To update these patches: 16 # - add the tracing code you need to the source files 17 # - run "git diff src > traces/foo.patch" 18 19 d=$(mktemp -d) 20 21 git apply --3way ${patch} 22 23 for variant_dir in test/{i,ii}-{128,192,256} 24 do 25 make -C ${variant_dir} ${trace_type} IMPLEMENTATION=${implem} 26 done 27 28 cp results/{i,ii}-{128,192,256}/${trace_type}-*.txt ${d} 29 tar czf results/${trace_type}.tgz -C ${d} . 30 31 rm -r ${d} 32 33 git apply --3way --reverse ${patch}