Skip to content

Commit 693a391

Browse files
committed
test: update cli arg ordering
1 parent a506c57 commit 693a391

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

rewatch/tests/compile.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,48 +33,48 @@ fi
3333
node ./packages/main/src/Main.mjs > ./packages/main/src/output.txt
3434

3535
mv ./packages/main/src/Main.res ./packages/main/src/Main2.res
36-
rewatch build --no-timing --snapshot-output &> ../tests/snapshots/rename-file.txt
36+
rewatch build --snapshot-output &> ../tests/snapshots/rename-file.txt
3737
mv ./packages/main/src/Main2.res ./packages/main/src/Main.res
3838

3939
# Rename a file with a dependent - this should trigger an error
4040
mv ./packages/main/src/InternalDep.res ./packages/main/src/InternalDep2.res
41-
rewatch build --no-timing --snapshot-output &> ../tests/snapshots/rename-file-internal-dep.txt
41+
rewatch build --snapshot-output &> ../tests/snapshots/rename-file-internal-dep.txt
4242
# normalize paths so the snapshot is the same on all machines
4343
normalize_paths ../tests/snapshots/rename-file-internal-dep.txt
4444
mv ./packages/main/src/InternalDep2.res ./packages/main/src/InternalDep.res
4545

4646
# Rename a file with a dependent in a namespaced package - this should trigger an error (regression)
4747
mv ./packages/new-namespace/src/Other_module.res ./packages/new-namespace/src/Other_module2.res
48-
rewatch build --no-timing --snapshot-output &> ../tests/snapshots/rename-file-internal-dep-namespace.txt
48+
rewatch build --snapshot-output &> ../tests/snapshots/rename-file-internal-dep-namespace.txt
4949
# normalize paths so the snapshot is the same on all machines
5050
normalize_paths ../tests/snapshots/rename-file-internal-dep-namespace.txt
5151
mv ./packages/new-namespace/src/Other_module2.res ./packages/new-namespace/src/Other_module.res
5252

5353
rewatch build &> /dev/null
5454
mv ./packages/main/src/ModuleWithInterface.resi ./packages/main/src/ModuleWithInterface2.resi
55-
rewatch build --no-timing --snapshot-output &> ../tests/snapshots/rename-interface-file.txt
55+
rewatch build --snapshot-output &> ../tests/snapshots/rename-interface-file.txt
5656
# normalize paths so the snapshot is the same on all machines
5757
normalize_paths ../tests/snapshots/rename-interface-file.txt
5858
mv ./packages/main/src/ModuleWithInterface2.resi ./packages/main/src/ModuleWithInterface.resi
5959
rewatch build &> /dev/null
6060
mv ./packages/main/src/ModuleWithInterface.res ./packages/main/src/ModuleWithInterface2.res
61-
rewatch build --no-timing --snapshot-output &> ../tests/snapshots/rename-file-with-interface.txt
61+
rewatch build --snapshot-output &> ../tests/snapshots/rename-file-with-interface.txt
6262
# normalize paths so the snapshot is the same on all machines
6363
normalize_paths ../tests/snapshots/rename-file-with-interface.txt
6464
mv ./packages/main/src/ModuleWithInterface2.res ./packages/main/src/ModuleWithInterface.res
6565
rewatch build &> /dev/null
6666

6767
# when deleting a file that other files depend on, the compile should fail
6868
rm packages/dep02/src/Dep02.res
69-
rewatch build --no-timing --snapshot-output &> ../tests/snapshots/remove-file.txt
69+
rewatch build --snapshot-output &> ../tests/snapshots/remove-file.txt
7070
# normalize paths so the snapshot is the same on all machines
7171
normalize_paths ../tests/snapshots/remove-file.txt
7272
git checkout -- packages/dep02/src/Dep02.res
7373
rewatch build &> /dev/null
7474

7575
# it should show an error when we have a dependency cycle
7676
echo 'Dep01.log()' >> packages/new-namespace/src/NS_alias.res
77-
rewatch build --no-timing --snapshot-output &> ../tests/snapshots/dependency-cycle.txt
77+
rewatch build --snapshot-output &> ../tests/snapshots/dependency-cycle.txt
7878
git checkout -- packages/new-namespace/src/NS_alias.res
7979

8080
# it should compile dev dependencies with the --dev flag

rewatch/tests/suite-ci.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ cd $(dirname $0)
88
# Get rewatch executable location from the first argument or use default
99
if [ -n "$1" ]; then
1010
REWATCH_EXECUTABLE="$1"
11+
BSC_PATH=""
1112
else
12-
REWATCH_EXECUTABLE="../target/release/rewatch --bsc-path ../../_build/install/default/bin/bsc"
13+
REWATCH_EXECUTABLE="../target/release/rewatch"
14+
BSC_PATH="--bsc-path ../../_build/install/default/bin/bsc"
1315
fi
1416
export REWATCH_EXECUTABLE
17+
export BSC_PATH
1518

1619
source ./utils.sh
1720

rewatch/tests/utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ overwrite() { echo -e "\r\033[1A\033[0K$@"; }
33
success() { echo -e "- ✅ \033[32m$1\033[0m"; }
44
error() { echo -e "- 🛑 \033[31m$1\033[0m"; }
55
bold() { echo -e "\033[1m$1\033[0m"; }
6-
rewatch() { RUST_BACKTRACE=1 $REWATCH_EXECUTABLE $@; }
7-
rewatch_bg() { RUST_BACKTRACE=1 nohup $REWATCH_EXECUTABLE $@; }
6+
rewatch() { RUST_BACKTRACE=1 $REWATCH_EXECUTABLE $@ $BSC_PATH; }
7+
rewatch_bg() { RUST_BACKTRACE=1 nohup $REWATCH_EXECUTABLE $@ $BSC_PATH; }
88

99
# Detect if running on Windows
1010
is_windows() {

0 commit comments

Comments
 (0)