File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 - uses : chetan/git-restore-mtime-action@v2
3636 - run : tool/build --verbose --no-run
3737 - run : tool/test/all
38+ env :
39+ WATCHER : ${{github.workspace}}/out/${{matrix.target-platform}}/Debug/wtr.watcher.asan
3840 - run : tool/build --verbose --no-build --no-run-perf
3941 - run : tool/build --verbose --no-build --no-run-unit
4042 - run : ls -al out/${{matrix.target-platform}}/Debug
Original file line number Diff line number Diff line change 3333 - uses : chetan/git-restore-mtime-action@v2
3434 - run : tool/build --verbose --no-run
3535 - run : tool/test/all
36+ env :
37+ WATCHER : ${{github.workspace}}/out/${{matrix.target-platform}}/Debug/wtr.watcher.asan
3638 - run : tool/build --verbose --no-build --no-run-perf
3739 - run : tool/build --verbose --no-build --no-run-unit
3840 - run : ls -al out/${{matrix.target-platform}}/Debug
Original file line number Diff line number Diff line change 88# shellcheck disable=SC2317
99# SC2317: Command can be reached.
1010
11- beganat=$( date -u +" %Y-%m-%dT%H:%M:%SZ" ) # or date --iso=ns -u on non-bsd
12- builddir=$( (cd " $( dirname " $0 " ) /../../out" && pwd) )
13- testdir=$builddir /tst-$beganat
11+ testdir=$( mktemp -d -t tst-XXXXXX) || exit 1
12+ WATCHER=$( realpath " ${WATCHER:- $(command -v wtr.watcher)} " ) || {
13+ echo WATCHER env var not set to a valid path and wtr.watcher not found in PATH 1>&2
14+ exit 1
15+ }
1416export testdir
1517
1618trap " cd '$PWD ' ; rm -rf '$testdir ' '$testdir .json'" EXIT
17- mkdir -p " $testdir " || exit 1
1819cd " $testdir " || exit 1
1920
20- PATH=$builddir /this/Debug:$PATH
21-
22- # Otherwise, the Darwin watcher will the testdir's creation event
21+ # Otherwise, the Darwin watcher will see the testdir's creation event
2322[ " $( uname -s) " = Darwin ] && sleep 0.2
2423
2524watch-async () {
26- watcher-via-nix () { nix run --quiet .\# watcher -- " $@ " ; }
27- watcher=$( command -v wtr.watcher || echo ' watcher-via-nix' )
28-
29- " $watcher " " $@ " &
25+ " $WATCHER " " $@ " &
3026 sleep 0.1
3127}
3228export -f watch-async
You can’t perform that action at this time.
0 commit comments