Skip to content

Commit 329887b

Browse files
committed
test: pass --no-timing explicitly
1 parent 2a1a78b commit 329887b

9 files changed

+26
-26
lines changed

tests/compile.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,44 +33,44 @@ 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 &> ../tests/snapshots/rename-file.txt
36+
rewatch build --no-timing &> ../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 &> ../tests/snapshots/rename-file-internal-dep.txt
41+
rewatch build --no-timing &> ../tests/snapshots/rename-file-internal-dep.txt
4242
# replace the absolute path so the snapshot is the same on all machines
4343
replace "s/$(pwd | sed "s/\//\\\\\//g")//g" ../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 &> ../tests/snapshots/rename-file-internal-dep-namespace.txt
48+
rewatch build --no-timing &> ../tests/snapshots/rename-file-internal-dep-namespace.txt
4949
# replace the absolute path so the snapshot is the same on all machines
5050
replace "s/$(pwd | sed "s/\//\\\\\//g")//g" ../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 &> ../tests/snapshots/rename-interface-file.txt
55+
rewatch build --no-timing &> ../tests/snapshots/rename-interface-file.txt
5656
mv ./packages/main/src/ModuleWithInterface2.resi ./packages/main/src/ModuleWithInterface.resi
5757
rewatch build &> /dev/null
5858
mv ./packages/main/src/ModuleWithInterface.res ./packages/main/src/ModuleWithInterface2.res
59-
rewatch build &> ../tests/snapshots/rename-file-with-interface.txt
59+
rewatch build --no-timing &> ../tests/snapshots/rename-file-with-interface.txt
6060
mv ./packages/main/src/ModuleWithInterface2.res ./packages/main/src/ModuleWithInterface.res
6161
rewatch build &> /dev/null
6262

6363
# when deleting a file that other files depend on, the compile should fail
6464
rm packages/dep02/src/Dep02.res
65-
rewatch build &> ../tests/snapshots/remove-file.txt
65+
rewatch build --no-timing &> ../tests/snapshots/remove-file.txt
6666
# replace the absolute path so the snapshot is the same on all machines
6767
replace "s/$(pwd | sed "s/\//\\\\\//g")//g" ../tests/snapshots/remove-file.txt
6868
git checkout -- packages/dep02/src/Dep02.res
6969
rewatch build &> /dev/null
7070

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

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

tests/snapshots/dependency-cycle.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[2/7] 👀 Finding source files...[2/7] 👀 Found source files in 0.00s
33
[3/7] 📝 Reading compile state...[3/7] 📝 Read compile state 0.00s
44
[4/7] 🧹 Cleaning up previous build...[4/7] 🧹 Cleaned 0/94 0.00s
5-
[5/7] 🧱 Parsed 1 source files in 0.02s
5+
[5/7] 🧱 Parsed 1 source files in 0.00s
66
[6/7] 🌴 Collected deps in 0.00s
77
[7/7] ❌ Compiled 0 modules in 0.00s
88

tests/snapshots/remove-file.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[4/7] 🧹 Cleaning up previous build...[4/7] 🧹 Cleaned 1/94 0.00s
55
[5/7] 🧱 Parsed 0 source files in 0.00s
66
[6/7] 🌴 Collected deps in 0.00s
7-
[7/7] ❌ Compiled 1 modules in 0.01s
7+
[7/7] ❌ Compiled 1 modules in 0.00s
88

99
We've found a bug for you!
1010
/packages/dep01/src/Dep01.res:3:9-17

tests/snapshots/rename-file-internal-dep-namespace.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
[2/7] 👀 Finding source files...[2/7] 👀 Found source files in 0.00s
33
[3/7] 📝 Reading compile state...[3/7] 📝 Read compile state 0.00s
44
[4/7] 🧹 Cleaning up previous build...[4/7] 🧹 Cleaned 2/94 0.00s
5-
[5/7] 🧱 Parsed 2 source files in 0.02s
5+
[5/7] 🧱 Parsed 2 source files in 0.00s
66
[6/7] 🌴 Collected deps in 0.00s
7-
[7/7] ❌ Compiled 3 modules in 0.01s
7+
[7/7] ❌ Compiled 3 modules in 0.00s
88

99
We've found a bug for you!
1010
/packages/new-namespace/src/NS_alias.res:2:1-16

tests/snapshots/rename-file-internal-dep.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
[2/7] 👀 Finding source files...[2/7] 👀 Found source files in 0.00s
33
[3/7] 📝 Reading compile state...[3/7] 📝 Read compile state 0.00s
44
[4/7] 🧹 Cleaning up previous build...[4/7] 🧹 Cleaned 2/94 0.00s
5-
[5/7] 🧱 Parsed 2 source files in 0.01s
5+
[5/7] 🧱 Parsed 2 source files in 0.00s
66
[6/7] 🌴 Collected deps in 0.00s
7-
[7/7] ❌ Compiled 2 modules in 0.01s
7+
[7/7] ❌ Compiled 2 modules in 0.00s
88

99
We've found a bug for you!
1010
/packages/main/src/Main.res:4:8-24

tests/snapshots/rename-file-with-interface.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[2/7] 👀 Found source files in 0.00s
55
[3/7] 📝 Reading compile state...[3/7] 📝 Read compile state 0.00s
66
[4/7] 🧹 Cleaning up previous build...[4/7] 🧹 Cleaned 2/94 0.00s
7-
[5/7] 🧱 Parsed 1 source files in 0.01s
7+
[5/7] 🧱 Parsed 1 source files in 0.00s
88
[6/7] 🌴 Collected deps in 0.00s
9-
[7/7] 🤺 Compiled 2 modules in 0.01s
9+
[7/7] 🤺 Compiled 2 modules in 0.00s
1010

11-
✨ Finished Compilation in 0.03s
11+
✨ Finished Compilation in 0.00s

tests/snapshots/rename-file.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[1/7] 📦 Building package tree...[1/7] 📦 Built package tree in 0.01s
1+
[1/7] 📦 Building package tree...[1/7] 📦 Built package tree in 0.00s
22
[2/7] 👀 Finding source files...[2/7] 👀 Found source files in 0.00s
3-
[3/7] 📝 Reading compile state...[3/7] 📝 Read compile state 0.01s
3+
[3/7] 📝 Reading compile state...[3/7] 📝 Read compile state 0.00s
44
[4/7] 🧹 Cleaning up previous build...[4/7] 🧹 Cleaned 1/94 0.00s
5-
[5/7] 🧱 Parsed 1 source files in 0.01s
5+
[5/7] 🧱 Parsed 1 source files in 0.00s
66
[6/7] 🌴 Collected deps in 0.00s
7-
[7/7] 🤺 Compiled 1 modules in 0.01s
7+
[7/7] 🤺 Compiled 1 modules in 0.00s
88

9-
✨ Finished Compilation in 0.06s
9+
✨ Finished Compilation in 0.00s

tests/snapshots/rename-interface-file.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[2/7] 👀 Found source files in 0.00s
55
[3/7] 📝 Reading compile state...[3/7] 📝 Read compile state 0.00s
66
[4/7] 🧹 Cleaning up previous build...[4/7] 🧹 Cleaned 1/94 0.00s
7-
[5/7] 🧱 Parsed 1 source files in 0.01s
7+
[5/7] 🧱 Parsed 1 source files in 0.00s
88
[6/7] 🌴 Collected deps in 0.00s
9-
[7/7] 🤺 Compiled 2 modules in 0.01s
9+
[7/7] 🤺 Compiled 2 modules in 0.00s
1010

11-
✨ Finished Compilation in 0.03s
11+
✨ Finished Compilation in 0.00s

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 --no-timing=true $@; }
7-
rewatch_bg() { RUST_BACKTRACE=1 nohup $REWATCH_EXECUTABLE --no-timing=true $@; }
6+
rewatch() { RUST_BACKTRACE=1 $REWATCH_EXECUTABLE $@; }
7+
rewatch_bg() { RUST_BACKTRACE=1 nohup $REWATCH_EXECUTABLE $@; }
88

99
replace() {
1010
if [[ $OSTYPE == 'darwin'* ]];

0 commit comments

Comments
 (0)