From bf50c64e86afc308b245770beec920ad5e63e6f5 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 18 Oct 2020 14:21:25 -0700 Subject: [PATCH] scripts: rename tools/ directory to scripts/ "scripts" is a more descriptive name than "tools", which sounds too similar to "programs". --- .travis.yml | 12 ++++++------ Makefile | 2 +- {tools => scripts}/afl-fuzz/Makefile | 0 .../afl-fuzz/deflate_compress/fuzz.c | 0 .../afl-fuzz/deflate_compress/inputs/0 | Bin .../afl-fuzz/deflate_decompress/fuzz.c | 0 .../afl-fuzz/deflate_decompress/inputs/0 | 0 .../afl-fuzz/gzip_decompress/fuzz.c | 0 .../afl-fuzz/gzip_decompress/inputs/0 | Bin .../afl-fuzz/prepare_for_fuzz.sh | 0 .../afl-fuzz/zlib_decompress/fuzz.c | 0 .../afl-fuzz/zlib_decompress/inputs/0 | 0 {tools => scripts}/android_build.sh | 0 {tools => scripts}/checksum_benchmarks.sh | 0 {tools => scripts}/exec_tests.sh | 0 {tools => scripts}/gen_crc32_multipliers.c | 0 {tools => scripts}/gen_crc32_table.c | 0 {tools => scripts}/gzip_tests.sh | 0 {tools => scripts}/make-windows-releases | 0 {tools => scripts}/mips_build.sh | 0 {tools => scripts}/msc_test.bat | 0 {tools => scripts}/pgo_build.sh | 0 .../produce_gzip_benchmark_table.sh | 0 {tools => scripts}/run_tests.sh | 18 +++++++++--------- {tools => scripts}/windows_build.sh | 0 25 files changed, 16 insertions(+), 16 deletions(-) rename {tools => scripts}/afl-fuzz/Makefile (100%) rename {tools => scripts}/afl-fuzz/deflate_compress/fuzz.c (100%) rename {tools => scripts}/afl-fuzz/deflate_compress/inputs/0 (100%) rename {tools => scripts}/afl-fuzz/deflate_decompress/fuzz.c (100%) rename {tools => scripts}/afl-fuzz/deflate_decompress/inputs/0 (100%) rename {tools => scripts}/afl-fuzz/gzip_decompress/fuzz.c (100%) rename {tools => scripts}/afl-fuzz/gzip_decompress/inputs/0 (100%) rename {tools => scripts}/afl-fuzz/prepare_for_fuzz.sh (100%) rename {tools => scripts}/afl-fuzz/zlib_decompress/fuzz.c (100%) rename {tools => scripts}/afl-fuzz/zlib_decompress/inputs/0 (100%) rename {tools => scripts}/android_build.sh (100%) rename {tools => scripts}/checksum_benchmarks.sh (100%) rename {tools => scripts}/exec_tests.sh (100%) rename {tools => scripts}/gen_crc32_multipliers.c (100%) rename {tools => scripts}/gen_crc32_table.c (100%) rename {tools => scripts}/gzip_tests.sh (100%) rename {tools => scripts}/make-windows-releases (100%) rename {tools => scripts}/mips_build.sh (100%) rename {tools => scripts}/msc_test.bat (100%) rename {tools => scripts}/pgo_build.sh (100%) rename {tools => scripts}/produce_gzip_benchmark_table.sh (100%) rename {tools => scripts}/run_tests.sh (96%) rename {tools => scripts}/windows_build.sh (100%) diff --git a/.travis.yml b/.travis.yml index fc01af8..832fee5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: - sudo apt-get install -y libz-dev gcc-multilib libz-dev:i386 libc6-dev-i386 valgrind clang gcc-4.8-multilib gcc-mingw-w64-i686 script: - - tools/run_tests.sh native freestanding + - scripts/run_tests.sh native freestanding - name: Checksum, static analysis, and edge case tests (Linux) os: linux @@ -22,7 +22,7 @@ matrix: - sudo apt-get install -y libz-dev gcc-multilib libz-dev:i386 libc6-dev-i386 clang python3 script: - - tools/run_tests.sh checksum_benchmarks static_analysis edge_case + - scripts/run_tests.sh checksum_benchmarks static_analysis edge_case - name: Native tests (Linux aarch64) os: linux @@ -31,7 +31,7 @@ matrix: before_install: - sudo apt-get install -y libz-dev valgrind clang script: - - tools/run_tests.sh native freestanding + - scripts/run_tests.sh native freestanding - name: Checksum, static analysis, and edge case tests (Linux aarch64) os: linux @@ -40,7 +40,7 @@ matrix: before_install: - sudo apt-get install -y libz-dev clang python3 script: - - tools/run_tests.sh checksum_benchmarks static_analysis edge_case + - scripts/run_tests.sh checksum_benchmarks static_analysis edge_case - name: gzip and cross-compile-for-Windows tests (Linux) os: linux @@ -49,7 +49,7 @@ matrix: - sudo apt-get install -y libz-dev valgrind gcc-mingw-w64-x86-64 libz-mingw-w64-dev script: - - tools/run_tests.sh gzip windows + - scripts/run_tests.sh gzip windows - name: Basic tests (old Linux distro, gcc) os: linux @@ -95,4 +95,4 @@ matrix: before_install: - sudo apt-get install -y libz-dev valgrind clang script: - - tools/run_tests.sh native freestanding + - scripts/run_tests.sh native freestanding diff --git a/Makefile b/Makefile index 3c09edc..e7b15fa 100644 --- a/Makefile +++ b/Makefile @@ -317,7 +317,7 @@ uninstall: test_programs:$(TEST_PROGRAMS) # A minimal 'make check' target. This only runs some quick tests; -# use tools/run_tests.sh if you want to run the full tests. +# use scripts/run_tests.sh if you want to run the full tests. check:test_programs ./benchmark$(PROG_SUFFIX) < ./benchmark$(PROG_SUFFIX) for prog in test_*; do \ diff --git a/tools/afl-fuzz/Makefile b/scripts/afl-fuzz/Makefile similarity index 100% rename from tools/afl-fuzz/Makefile rename to scripts/afl-fuzz/Makefile diff --git a/tools/afl-fuzz/deflate_compress/fuzz.c b/scripts/afl-fuzz/deflate_compress/fuzz.c similarity index 100% rename from tools/afl-fuzz/deflate_compress/fuzz.c rename to scripts/afl-fuzz/deflate_compress/fuzz.c diff --git a/tools/afl-fuzz/deflate_compress/inputs/0 b/scripts/afl-fuzz/deflate_compress/inputs/0 similarity index 100% rename from tools/afl-fuzz/deflate_compress/inputs/0 rename to scripts/afl-fuzz/deflate_compress/inputs/0 diff --git a/tools/afl-fuzz/deflate_decompress/fuzz.c b/scripts/afl-fuzz/deflate_decompress/fuzz.c similarity index 100% rename from tools/afl-fuzz/deflate_decompress/fuzz.c rename to scripts/afl-fuzz/deflate_decompress/fuzz.c diff --git a/tools/afl-fuzz/deflate_decompress/inputs/0 b/scripts/afl-fuzz/deflate_decompress/inputs/0 similarity index 100% rename from tools/afl-fuzz/deflate_decompress/inputs/0 rename to scripts/afl-fuzz/deflate_decompress/inputs/0 diff --git a/tools/afl-fuzz/gzip_decompress/fuzz.c b/scripts/afl-fuzz/gzip_decompress/fuzz.c similarity index 100% rename from tools/afl-fuzz/gzip_decompress/fuzz.c rename to scripts/afl-fuzz/gzip_decompress/fuzz.c diff --git a/tools/afl-fuzz/gzip_decompress/inputs/0 b/scripts/afl-fuzz/gzip_decompress/inputs/0 similarity index 100% rename from tools/afl-fuzz/gzip_decompress/inputs/0 rename to scripts/afl-fuzz/gzip_decompress/inputs/0 diff --git a/tools/afl-fuzz/prepare_for_fuzz.sh b/scripts/afl-fuzz/prepare_for_fuzz.sh similarity index 100% rename from tools/afl-fuzz/prepare_for_fuzz.sh rename to scripts/afl-fuzz/prepare_for_fuzz.sh diff --git a/tools/afl-fuzz/zlib_decompress/fuzz.c b/scripts/afl-fuzz/zlib_decompress/fuzz.c similarity index 100% rename from tools/afl-fuzz/zlib_decompress/fuzz.c rename to scripts/afl-fuzz/zlib_decompress/fuzz.c diff --git a/tools/afl-fuzz/zlib_decompress/inputs/0 b/scripts/afl-fuzz/zlib_decompress/inputs/0 similarity index 100% rename from tools/afl-fuzz/zlib_decompress/inputs/0 rename to scripts/afl-fuzz/zlib_decompress/inputs/0 diff --git a/tools/android_build.sh b/scripts/android_build.sh similarity index 100% rename from tools/android_build.sh rename to scripts/android_build.sh diff --git a/tools/checksum_benchmarks.sh b/scripts/checksum_benchmarks.sh similarity index 100% rename from tools/checksum_benchmarks.sh rename to scripts/checksum_benchmarks.sh diff --git a/tools/exec_tests.sh b/scripts/exec_tests.sh similarity index 100% rename from tools/exec_tests.sh rename to scripts/exec_tests.sh diff --git a/tools/gen_crc32_multipliers.c b/scripts/gen_crc32_multipliers.c similarity index 100% rename from tools/gen_crc32_multipliers.c rename to scripts/gen_crc32_multipliers.c diff --git a/tools/gen_crc32_table.c b/scripts/gen_crc32_table.c similarity index 100% rename from tools/gen_crc32_table.c rename to scripts/gen_crc32_table.c diff --git a/tools/gzip_tests.sh b/scripts/gzip_tests.sh similarity index 100% rename from tools/gzip_tests.sh rename to scripts/gzip_tests.sh diff --git a/tools/make-windows-releases b/scripts/make-windows-releases similarity index 100% rename from tools/make-windows-releases rename to scripts/make-windows-releases diff --git a/tools/mips_build.sh b/scripts/mips_build.sh similarity index 100% rename from tools/mips_build.sh rename to scripts/mips_build.sh diff --git a/tools/msc_test.bat b/scripts/msc_test.bat similarity index 100% rename from tools/msc_test.bat rename to scripts/msc_test.bat diff --git a/tools/pgo_build.sh b/scripts/pgo_build.sh similarity index 100% rename from tools/pgo_build.sh rename to scripts/pgo_build.sh diff --git a/tools/produce_gzip_benchmark_table.sh b/scripts/produce_gzip_benchmark_table.sh similarity index 100% rename from tools/produce_gzip_benchmark_table.sh rename to scripts/produce_gzip_benchmark_table.sh diff --git a/tools/run_tests.sh b/scripts/run_tests.sh similarity index 96% rename from tools/run_tests.sh rename to scripts/run_tests.sh index 59e11c8..5af6bb9 100755 --- a/tools/run_tests.sh +++ b/scripts/run_tests.sh @@ -2,7 +2,7 @@ # # Test script for libdeflate # -# Usage: ./tools/run_tests.sh [TESTGROUP]... [-TESTGROUP]... +# Usage: ./scripts/run_tests.sh [TESTGROUP]... [-TESTGROUP]... # # By default all tests are run, but it is possible to explicitly include or # exclude specific test groups. @@ -56,7 +56,7 @@ fi NDKDIR="${NDKDIR:=$HOME/android-ndk-r21d}" -FILES=("$SMOKEDATA" ./tools/exec_tests.sh benchmark 'test_*') +FILES=("$SMOKEDATA" ./scripts/exec_tests.sh benchmark 'test_*') EXEC_TESTS_CMD="WRAPPER= SMOKEDATA=\"$(basename $SMOKEDATA)\" sh exec_tests.sh" NPROC=$(grep -c processor /proc/cpuinfo) VALGRIND="valgrind --quiet --error-exitcode=100 --leak-check=full --errors-for-leak-kinds=all" @@ -165,7 +165,7 @@ native_build_and_test() { fi WRAPPER="$WRAPPER" SMOKEDATA="$SMOKEDATA" \ LIBDEFLATE_DISABLE_CPU_FEATURES="$disable_str" \ - sh ./tools/exec_tests.sh > /dev/null + sh ./scripts/exec_tests.sh > /dev/null done } @@ -239,13 +239,13 @@ freestanding_tests() { checksum_benchmarks() { test_group_included checksum_benchmarks || return 0 - ./tools/checksum_benchmarks.sh + ./scripts/checksum_benchmarks.sh } ############################################################################### android_build_and_test() { - run_cmd ./tools/android_build.sh --ndkdir="$NDKDIR" "$@" \ + run_cmd ./scripts/android_build.sh --ndkdir="$NDKDIR" "$@" \ all test_programs run_cmd adb push ${FILES[@]} /data/local/tmp/ @@ -301,7 +301,7 @@ mips_tests() { log_skip "Can't run MIPS tests: dd-wrt system not available" return 0 fi - run_cmd ./tools/mips_build.sh + run_cmd ./scripts/mips_build.sh run_cmd scp ${FILES[@]} root@dd-wrt: run_cmd ssh root@dd-wrt "$EXEC_TESTS_CMD" @@ -364,21 +364,21 @@ gzip_tests() { log "Running gzip program tests with GZIP=$gzip," \ "GUNZIP=$gunzip" GZIP="$gzip" GUNZIP="$gunzip" SMOKEDATA="$SMOKEDATA" \ - ./tools/gzip_tests.sh + ./scripts/gzip_tests.sh done done if have_valgrind; then log "Running gzip program tests with Valgrind" GZIP="$VALGRIND $PWD/gzip" GUNZIP="$VALGRIND $PWD/gunzip" \ - SMOKEDATA="$SMOKEDATA" ./tools/gzip_tests.sh + SMOKEDATA="$SMOKEDATA" ./scripts/gzip_tests.sh fi if have_ubsan; then log "Running gzip program tests with undefined behavior sanitizer" run_cmd make -j$NPROC CC=clang CFLAGS="$SANITIZE_CFLAGS" gzip gunzip GZIP="$PWD/gzip" GUNZIP="$PWD/gunzip" \ - SMOKEDATA="$SMOKEDATA" ./tools/gzip_tests.sh + SMOKEDATA="$SMOKEDATA" ./scripts/gzip_tests.sh fi } diff --git a/tools/windows_build.sh b/scripts/windows_build.sh similarity index 100% rename from tools/windows_build.sh rename to scripts/windows_build.sh