diff --git a/tools/generator.sh b/tools/generator.sh deleted file mode 100755 index c48212126..000000000 --- a/tools/generator.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# Copyright JS Foundation and other contributors, http://js.foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -echo "#define JERRY_MCU_SCRIPT \\" > $2 -# escape all " characters, wrap each line in double quotes and end the line with '\' -sed 's/"/\\"/g' $1 | sed 's/^.*$/"\0" \\/g' >> $2 -echo >> $2 diff --git a/tools/make-log-perf-compare.sh b/tools/make-log-perf-compare.sh deleted file mode 100755 index 573104525..000000000 --- a/tools/make-log-perf-compare.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# Copyright JS Foundation and other contributors, http://js.foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -commit_first=$1 -shift - -commit_second=$1 -shift - -exceptions="-e '' $*" - -if [[ "$commit_first" == "" ]] || [[ "$commit_second" == "" ]] -then - exit 1 -fi - -perf_first=`git notes --ref=arm-linux-perf show $commit_first | grep -v $exceptions` -if [ $? -ne 0 ] -then - exit 1 -fi - -perf_second=`git notes --ref=arm-linux-perf show $commit_second | grep -v $exceptions` -if [ $? -ne 0 ] -then - exit 1 -fi - -n=0 -rel_mult=1.0 -for bench in `echo "$perf_first" | cut -d ':' -f 1` -do - value1=`echo "$perf_first" | grep "^$bench: " | cut -d ':' -f 2 | cut -d 's' -f 1` - value2=`echo "$perf_second" | grep "^$bench: " | cut -d ':' -f 2 | cut -d 's' -f 1` - rel=`echo $value1 $value2 | awk '{print $2 / $1; }'` - percent=`echo $rel | awk '{print (1.0 - $1) * 100; }'` - - n=`echo $n | awk '{print $1 + 1;}'`; - rel_mult=`echo $rel_mult $rel | awk '{print $1 * $2;}'` - - echo $bench":"$value1"s ->"$value2"s ("$percent" %)" -done - -rel_gmean=`echo $rel_mult $n | awk '{print $1 ^ (1.0 / $2);}'` -percent_gmean=`echo $rel_gmean | awk '{print (1.0 - $1) * 100;}'` - -echo -echo $n $rel_mult $rel_gmean "("$percent_gmean "%)" diff --git a/tools/runners/run-stability-test.sh b/tools/runners/run-stability-test.sh deleted file mode 100755 index 25ec1e6c6..000000000 --- a/tools/runners/run-stability-test.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -# Copyright JS Foundation and other contributors, http://js.foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -NUM_COMMITS=$1 -BENCH=./tests/benchmarks/jerry/loop_arithmetics_1kk.js -TARGET=release.linux - -trap ctrl_c INT - -function ctrl_c() { - git checkout master >&/dev/null - exit 1 -} - -commits_to_push=`git log -$NUM_COMMITS | grep "^commit [0-9a-f]*$" | awk 'BEGIN { s = ""; } { s = $2" "s; } END { print s; }'` - -for commit_hash in $commits_to_push -do - git checkout $commit_hash >&/dev/null - - echo -e -n " > Testing...\n > " - echo `git log --format=%B -n 1 $commit_hash` - make -s $TARGET - ./tools/rss-measure.sh $TARGET $BENCH - echo -done - -git checkout master >&/dev/null diff --git a/tools/runners/run-tests-remote.sh b/tools/runners/run-tests-remote.sh deleted file mode 100755 index d6a01ebf5..000000000 --- a/tools/runners/run-tests-remote.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# Copyright JS Foundation and other contributors, http://js.foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -TARGET="$1" #debug.linux release.linux -TARGET_IP="$2" # ip address of target board -TARGET_USER="$3" # login -TARGET_PASS="$4" # password - -if [ $# -lt 4 ] -then - echo "This script runs ./jerry/* and ./jerry-test-suite/* tests on the remote board." - echo "" - echo "Usage:" - echo " 1st parameter: target to be tested: {debug.linux, release.linux}" - echo " 2nd parameter: ip address of target board: {110.110.110.110}" - echo " 3rd parameter: ssh login to target board: {login}" - echo " 4th parameter: ssh password to target board: {password}" - echo "" - echo "Example:" - echo " ./tools/runners/run-tests-remote.sh debug.linux 110.110.110.110 login password" - exit 1 -fi - -BASE_DIR=$(dirname "$(readlink -f "$0")" ) - -OUT_DIR="${BASE_DIR}"/../.././build/bin -LOGS_PATH_FULL="${OUT_DIR}"/"${TARGET}"/check - -export SSHPASS="${TARGET_PASS}" - -rm -rf "${LOGS_PATH_FULL}" - -mkdir -p "${LOGS_PATH_FULL}" - -REMOTE_TMP_DIR=$(sshpass -e ssh "${TARGET_USER}"@"${TARGET_IP}" 'mktemp -d') -REMOTE_TMP_TAR=$(sshpass -e ssh "${TARGET_USER}"@"${TARGET_IP}" 'mktemp') -LOCAL_TMP_TAR=$(mktemp) - -tar -zcf "${LOCAL_TMP_TAR}" \ - "${BASE_DIR}"/../.././build/bin/"${TARGET}" \ - "${BASE_DIR}"/../.././tests/benchmarks \ - "${BASE_DIR}"/../.././tests/jerry \ - "${BASE_DIR}"/../.././tests/jerry-test-suite \ - "${BASE_DIR}"/../.././tools/runners \ - "${BASE_DIR}"/../.././tools/precommit-full-testing.sh > /dev/null 2>&1 - -sshpass -e scp "${LOCAL_TMP_TAR}" "${TARGET_USER}"@"${TARGET_IP}":"${REMOTE_TMP_TAR}" - -sshpass -e ssh "${TARGET_USER}"@"${TARGET_IP}" \ - "tar -zxf \"${REMOTE_TMP_TAR}\" -C \"${REMOTE_TMP_DIR}\"; rm \"${REMOTE_TMP_TAR}\";\ - cd \"${REMOTE_TMP_DIR}\"; \ - ./tools/precommit-full-testing.sh ./build/bin \"$TARGET\" > ./build/bin/\"${TARGET}\"/check/run.log 2>&1; \ - echo \$? > ./build/bin/\"${TARGET}\"/check/IS_TEST_OK" - -sshpass -e scp -r "${TARGET_USER}"@"${TARGET_IP}":"${REMOTE_TMP_DIR}"/build/bin/"${TARGET}"/check/* "${LOGS_PATH_FULL}" -sshpass -e ssh "${TARGET_USER}"@"${TARGET_IP}" "rm -rf \"${REMOTE_TMP_DIR}\"" - -STATUS=$(cat "${LOGS_PATH_FULL}"/IS_TEST_OK) - -if [ "${STATUS}" == 0 ] ; then - echo "${TARGET} testing passed." - exit 0 -else - echo "${TARGET} testing failed." - echo "See logs in ${LOGS_PATH_FULL} directory for details." - exit 1 -fi \ No newline at end of file diff --git a/tools/runners/run-unittests-remote.sh b/tools/runners/run-unittests-remote.sh deleted file mode 100755 index 1acd4fc28..000000000 --- a/tools/runners/run-unittests-remote.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -# Copyright JS Foundation and other contributors, http://js.foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -TARGET_IP="$1" -TARGET_USER="$2" -TARGET_PASS="$3" - -if [ $# -lt 3 ] -then - echo "This script runs unittests on the remote board." - echo "" - echo "Usage:" - echo " 1st parameter: ip address of target board: {110.110.110.110}" - echo " 2nd parameter: ssh login to target board: {login}" - echo " 3rd parameter: ssh password to target board: {password}" - echo "" - echo "Example:" - echo " ./tools/runners/run-unittests-remote.sh 110.110.110.110 login password" - exit 1 -fi - -BASE_DIR=$(dirname "$(readlink -f "$0")" ) - -OUT_DIR="${BASE_DIR}"/../.././build/bin - -rm -rf "${OUT_DIR}"/unittests/check - -mkdir -p "${OUT_DIR}"/unittests/check - -export SSHPASS="${TARGET_PASS}" -REMOTE_TMP_DIR=$(sshpass -e ssh "${TARGET_USER}"@"${TARGET_IP}" 'mktemp -d') - -sshpass -e scp "${BASE_DIR}"/../../tools/runners/run-unittests.sh "${TARGET_USER}"@"${TARGET_IP}":"${REMOTE_TMP_DIR}" -sshpass -e scp -r "${OUT_DIR}"/unittests/* "${TARGET_USER}"@"${TARGET_IP}":"${REMOTE_TMP_DIR}" - -sshpass -e ssh "${TARGET_USER}"@"${TARGET_IP}" "mkdir -p \"${REMOTE_TMP_DIR}\"/check; \ - \"${REMOTE_TMP_DIR}\"/run-unittests.sh \"${REMOTE_TMP_DIR}\"; \ - echo \$? > \"${REMOTE_TMP_DIR}\"/check/IS_REMOTE_TEST_OK" - -sshpass -e scp -r "${TARGET_USER}"@$"{TARGET_IP}":"${REMOTE_TMP_DIR}"/check "${OUT_DIR}"/unittests - -sshpass -e ssh "${TARGET_USER}"@"${TARGET_IP}" "rm -rf \"${REMOTE_TMP_DIR}\"" - -STATUS=$(cat "${OUT_DIR}"/unittests/check/IS_REMOTE_TEST_OK) - -if [ "${STATUS}" == 0 ] ; then - echo "Unit tests run passed." - exit 0 -else - echo "Unit tests run failed. See ${OUT_DIR}/unittests/unit_tests_run.log for details." - exit 1 -fi diff --git a/tools/sort-fails.sh b/tools/sort-fails.sh deleted file mode 100755 index 6dfc7dd43..000000000 --- a/tools/sort-fails.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -# Copyright JS Foundation and other contributors, http://js.foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -INPUT_PATH="$1" -VERSION=$(git log -n 1 --pretty=format:"%H") -SYSTEM=$(uname -a) -TMP_DIR="afl-testing" -USAGE="Usage:\n\t./tools/sort-fails.sh PATH_TO_DIR_WITH_FAILS" - -if [ "$#" -ne 1 ] -then - echo -e "${USAGE}"; - echo "Argument number mismatch..."; - exit 1; -fi - -rm "$TMP_DIR" -r; mkdir "$TMP_DIR"; - -make debug.linux VALGRIND=ON -j && echo "Build OK"; - -for file in "$INPUT_PATH"/*; -do - key1=$(./build/bin/debug.linux/jerry --abort-on-fail $file 2>&1); - key2=$(valgrind --default-suppressions=yes ./build/bin/debug.linux/jerry --abort-on-fail $file 2>&1 \ - | sed -e 's/^==*[0-9][0-9]*==*//g' \ - | sed -e 's/^ Command: .*//g'); - - hash1=$(echo -n $key1 | md5sum); - hash2=$(echo -n $key2 | md5sum); - - dir="$TMP_DIR/$hash1"; - head="$TMP_DIR/$hash1.err.md"; - body="$dir/$hash2.err.md"; - - if [ ! -s "$dir" ]; then - mkdir -p "$dir"; touch "$head"; - echo "###### Version: $VERSION" >> "$head"; - echo "###### System:" >> "$head"; - echo '```' >> "$head"; - echo "$SYSTEM" >> "$head"; - echo '```' >> "$head"; - echo "###### Output:" >> "$head"; - echo '```' >> "$head"; - echo "$key1" >> "$head"; - echo '```' >> "$head"; - fi - - if [ ! -s "$body" ]; then - touch "$body"; - echo '###### Unique backtrace:```' >> "$body"; - echo '```' >> "$body"; - echo "$key2" >> "$body" - echo '```' >> "$body"; - fi - - echo "###### Test case($file):" >> "$body"; - echo '```js' >> "$body"; - cat "$file" >> "$body"; - echo '```' >> "$body"; - -done - -cd "$TMP_DIR"; -for dir in */ ; do - for file in "$dir"/*; - do - cat "$file" >> "${dir%/*}.err.md" - done - rm $dir -r; -done