Skip to content

Commit cc04113

Browse files
committed
Update our scripts for home locations/modern bash.
1 parent dec4d7c commit cc04113

File tree

14 files changed

+40
-20
lines changed

14 files changed

+40
-20
lines changed

ci/check.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set -ex
55

66
# Change to our project home.
77
script_dir=$(dirname "${BASH_SOURCE[0]}")
8-
cd "$script_dir"/..
8+
script_home=$(realpath "${script_dir}")
9+
cd "${script_home}"/..
910

1011
scripts/check.sh
1112
RUSTFLAGS="--deny warnings" cargo +nightly build --features=lint

ci/comprehensive.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ script_home=$(realpath "${script_dir}")
1313
home=$(dirname "${script_home}")
1414
cd "${home}"
1515

16+
# Ensure we have all our testing data files
17+
git submodule update --init
18+
1619
run_tests() {
1720
# Test the parse-float correctness tests
1821
cd "${home}"

ci/miri.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ set -ex
66

77
# Change to our project home.
88
script_dir=$(dirname "${BASH_SOURCE[0]}")
9-
home=$(dirname "${script_dir}")
9+
script_home=$(realpath "${script_dir}")
10+
home=$(dirname "${script_home}")
1011
cd "${home}"
1112

1213
# Print our cargo version, for debugging.
1314
cargo --version
1415

16+
# Ensure we have all our testing data files
17+
git submodule update --init
18+
1519
# Test our Miri logic
1620
rustup component add --toolchain nightly miri &2 > /dev/null || true
1721

ci/test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ set -ex
66

77
# Change to our project home.
88
script_dir=$(dirname "${BASH_SOURCE[0]}")
9-
home=$(dirname "${script_dir}")
9+
script_home=$(realpath "${script_dir}")
10+
home=$(dirname "${script_home}")
1011
cd "${home}"
1112

1213
# Print our cargo version, for debugging.
1314
cargo --version
1415

16+
# Ensure we have all our benchmark data files
17+
git submodule update --init lexical-benchmark/data
18+
1519
# Force default tests to disable default feature on NO_STD.
1620
if [ ! -z $NO_STD ]; then
1721
DEFAULT_FEATURES="--no-default-features"

scripts/asm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55

66
# Change to our project home.
77
script_dir=$(dirname "${BASH_SOURCE[0]}")
8-
cd "$script_dir"/../lexical-asm
8+
cd "${script_dir}"/../lexical-asm
99

1010
export RUSTFLAGS="--emit asm -C llvm-args=-x86-asm-syntax=intel"
1111
cargo +nightly build --release "$@"

scripts/bench.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -ex
55

66
# Change to our project home.
7-
script_dir=`dirname "${BASH_SOURCE[0]}"`
8-
cd "$script_dir"/../lexical-benchmark
7+
script_dir=$(dirname "${BASH_SOURCE[0]}")
8+
cd "${script_dir}"/../lexical-benchmark
99

1010
cargo test --bench '*'

scripts/check.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set -ex
55

66
# Change to our project home.
77
script_dir=$(dirname "${BASH_SOURCE[0]}")
8-
cd "$script_dir"/..
8+
script_home=$(realpath "${script_dir}")
9+
cd "${script_home}"/..
910

1011
# Make sure we error on warnings, and don't format in-place.
1112

scripts/coverage.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
set -e
1212

1313
# Change to our project home.
14-
script_dir=`dirname "${BASH_SOURCE[0]}"`
15-
cd "$script_dir"/..
14+
script_dir=$(dirname "${BASH_SOURCE[0]}")
15+
script_home=$(realpath "${script_dir}")
16+
cd "${script_home}"/..
1617

1718
cargo +nightly tarpaulin

scripts/fmt.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
set -e
55

66
# Change to our project home.
7-
script_dir=`dirname "${BASH_SOURCE[0]}"`
8-
cd "$script_dir"/..
7+
script_dir=$(dirname "${BASH_SOURCE[0]}")
8+
script_home=$(realpath "${script_dir}")
9+
cd "${script_home}"/..
910

1011
cargo +nightly fmt
1112

scripts/fuzz.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
set -e
55

66
# Change to our project home.
7-
script_dir=`dirname "${BASH_SOURCE[0]}"`
8-
cd "$script_dir"/..
7+
script_dir=$(dirname "${BASH_SOURCE[0]}")
8+
script_home=$(realpath "${script_dir}")
9+
cd "${script_home}"/..
910

1011
cargo +nightly fuzz run "$@"

0 commit comments

Comments
 (0)