RESOLVED FIXED 124550
run-jsc-stress-tests only supports host environments that have make installed
https://bugs.webkit.org/show_bug.cgi?id=124550
Summary run-jsc-stress-tests only supports host environments that have make installed
Mark Hahnenberg
Reported 2013-11-18 17:13:17 PST
This might not be the case for all hosts, so we should write an alternate "backend" for run-jsc-stress-tests to use normal shell commands rather than Makefiles. This will probably sacrifice the ability to run tests in parallel, at least in the first version.
Attachments
Patch (10.13 KB, patch)
2013-12-02 18:33 PST, Mark Hahnenberg
darin: review+
Mark Hahnenberg
Comment 1 2013-11-18 17:15:27 PST
This new backend could be enabled by passing --shell-runner to run-jsc-stress-tests. There would also be a (default) flag for --make-runner.
Mark Hahnenberg
Comment 2 2013-12-02 18:33:53 PST
Filip Pizlo
Comment 3 2013-12-03 10:21:06 PST
Comment on attachment 218254 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218254&action=review r=me too > Tools/Scripts/jsc-stress-test-helpers/shell-runner.sh:53 > +NUM_PROCS=`sysctl -n hw.activecpu` > +if [ $? -gt 0 ] > +then > + NUM_PROCS=`nproc --all 2>/dev/null` > + if [ $? -gt 0 ] > + then > + NUM_PROCS=1 > + fi > +fi > + > +INDEX_FILE=".index" > +TEST_LIST=".all_tests.txt" > +TEMP_FILE=".temp.txt" > +LOCK_DIR=".lock_dir" > + > +trap "kill -9 0" SIGINT > + > +echo 0 > ${INDEX_FILE} > +ls test_script_* > ${TEST_LIST} > + > +function lock_test_list() { > + until mkdir ${LOCK_DIR} 2> /dev/null; do sleep 0; done > +} > + > +function unlock_test_list() { > + rmdir ${LOCK_DIR} > +} > + > +TOTAL=`wc -l < "${TEST_LIST}" | sed 's/ //g'` > +for PROC in `seq ${NUM_PROCS}` > +do > + ( > + lock_test_list > + while [ -s ${TEST_LIST} ] > + do > + INDEX=`cat ${INDEX_FILE}` > + INDEX=$((INDEX + 1)) > + echo "${INDEX}" > ${INDEX_FILE} > + printf "\r ${INDEX}/${TOTAL}" > + > + TEST=`tail -n 1 ${TEST_LIST}` > + sed '$d' < ${TEST_LIST} > ${TEMP_FILE} > + mv ${TEMP_FILE} ${TEST_LIST} > + unlock_test_list > + > + sh ${TEST} > /dev/null > + > + lock_test_list > + done > + unlock_test_list > + )& > +done > +wait Copyright thingy?
Mark Hahnenberg
Comment 4 2013-12-03 10:48:28 PST
Note You need to log in before you can comment on or make changes to this bug.