Skip to content

Commit 78a98ca

Browse files
committed
suite-ci.sh -> suite.sh
1 parent 657ba7d commit 78a98ca

File tree

5 files changed

+49
-52
lines changed

5 files changed

+49
-52
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ jobs:
363363
shell: bash
364364

365365
- name: Run rewatch tests
366-
run: ./rewatch/tests/suite-ci.sh
366+
run: ./rewatch/tests/suite.sh
367367
shell: bash
368368

369369
- name: Run syntax benchmarks
@@ -671,7 +671,7 @@ jobs:
671671
working-directory: rewatch/testrepo
672672

673673
- name: Run rewatch integration tests
674-
run: ./rewatch/tests/suite-ci.sh node_modules/.bin/rescript
674+
run: ./rewatch/tests/suite.sh node_modules/.bin/rescript
675675
shell: bash
676676

677677
publish:

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ make test-rewatch # Run integration tests
373373

374374
**Note**: The rewatch project is located in the `rewatch/` directory with its own `Cargo.toml` file. All cargo commands should be run from the project root using the `--manifest-path rewatch/Cargo.toml` flag, as shown in the CI workflow.
375375

376-
**Integration Tests**: The `make test-rewatch` command runs bash-based integration tests located in `rewatch/tests/suite-ci.sh`. These tests use the `rewatch/testrepo/` directory as a test workspace with various package configurations to verify rewatch's behavior across different scenarios.
376+
**Integration Tests**: The `make test-rewatch` command runs bash-based integration tests located in `rewatch/tests/suite.sh`. These tests use the `rewatch/testrepo/` directory as a test workspace with various package configurations to verify rewatch's behavior across different scenarios.
377377

378378
#### Debugging
379379

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ test-gentype: | $(YARN_INSTALL_STAMP)
176176
make -C tests/gentype_tests/stdlib-no-shims clean test
177177

178178
test-rewatch: $(RESCRIPT_EXE) | $(YARN_INSTALL_STAMP)
179-
./rewatch/tests/suite-ci.sh
179+
./rewatch/tests/suite.sh
180180

181181
test-all: test test-gentype test-analysis test-tools test-rewatch
182182

rewatch/tests/suite-ci.sh

Lines changed: 0 additions & 47 deletions
This file was deleted.

rewatch/tests/suite.sh

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
11
#!/bin/bash
2+
3+
unset CLICOLOR_FORCE
4+
5+
# Make sure we are in the right directory
26
cd $(dirname $0)
3-
./suite-ci.sh
7+
8+
# Get rewatch executable location from the first argument or use default
9+
if [ -n "$1" ]; then
10+
REWATCH_EXECUTABLE="$1"
11+
else
12+
REWATCH_EXECUTABLE="../target/release/rescript"
13+
eval $(node ./get_bin_paths.js)
14+
fi
15+
16+
export REWATCH_EXECUTABLE
17+
export RESCRIPT_BSC_EXE
18+
export RESCRIPT_RUNTIME
19+
20+
source ./utils.sh
21+
22+
bold "Yarn install"
23+
(cd ../testrepo && yarn)
24+
25+
bold "Rescript version"
26+
(cd ../testrepo && ./node_modules/.bin/rescript --version)
27+
28+
# we need to reset the yarn.lock and package.json to the original state
29+
# so there is not diff in git. The CI will install new ReScript package
30+
bold "Reset package.json and yarn.lock"
31+
git checkout ../testrepo/yarn.lock &> /dev/null
32+
git checkout ../testrepo/package.json &> /dev/null
33+
success "Reset package.json and yarn.lock"
34+
35+
bold "Make sure the testrepo is clean"
36+
if git diff --exit-code ../testrepo &> diff.txt;
37+
then
38+
rm diff.txt
39+
success "Testrepo has no changes"
40+
else
41+
error "Testrepo is not clean to start with"
42+
cat diff.txt
43+
rm diff.txt
44+
exit 1
45+
fi
46+
47+
./compile.sh && ./watch.sh && ./lock.sh && ./suffix.sh && ./format.sh && ./clean.sh && ./experimental.sh && ./experimental-invalid.sh && ./compiler-args.sh

0 commit comments

Comments
 (0)