|
| 1 | +Setup |
| 2 | + $ . ${TESTDIR}/../../helpers/setup_integration_test.sh |
| 3 | + |
| 4 | +Test using $TURBO_ROOT$ in inputs and outputs |
| 5 | + $ cd fixtures/turbo_root_inputs_outputs |
| 6 | + $ ${TURBO} build --output-logs=hash-only |
| 7 | + • Packages in scope: pkg-a |
| 8 | + • Running build in 1 packages |
| 9 | + • Remote caching disabled |
| 10 | + pkg-a:build: cache miss, executing *hash* (glob) |
| 11 | + |
| 12 | + Tasks: 1 successful, 1 total |
| 13 | + Cached: 0 cached, 1 total |
| 14 | + Time: * (glob) |
| 15 | + |
| 16 | + $ test -f packages/pkg-a/dist/root-file.js |
| 17 | + $ cat packages/pkg-a/dist/root-file.js |
| 18 | + console.log("root file"); |
| 19 | + $ rm packages/pkg-a/dist/root-file.js |
| 20 | + |
| 21 | + $ ${TURBO} build --output-logs=hash-only |
| 22 | + • Packages in scope: pkg-a |
| 23 | + • Running build in 1 packages |
| 24 | + • Remote caching disabled |
| 25 | + pkg-a:build: cache hit, replaying output *hash* (glob) |
| 26 | + |
| 27 | + Tasks: 1 successful, 1 total |
| 28 | + Cached: 1 cached, 1 total |
| 29 | + Time: * (glob) |
| 30 | + |
| 31 | + $ test -f packages/pkg-a/dist/root-file.js |
| 32 | + $ cat packages/pkg-a/dist/root-file.js |
| 33 | + console.log("root file"); |
| 34 | + |
| 35 | + $ echo "console.log('modified');" > root-file.js |
| 36 | + |
| 37 | + $ ${TURBO} build --output-logs=hash-only |
| 38 | + • Packages in scope: pkg-a |
| 39 | + • Running build in 1 packages |
| 40 | + • Remote caching disabled |
| 41 | + pkg-a:build: cache miss, executing *hash* (glob) |
| 42 | + |
| 43 | + Tasks: 1 successful, 1 total |
| 44 | + Cached: 0 cached, 1 total |
| 45 | + Time: * (glob) |
| 46 | + |
| 47 | + $ cat packages/pkg-a/dist/root-file.js |
| 48 | + console.log('modified'); |
| 49 | + |
| 50 | +Test using $TURBO_ROOT$ in outputs only |
| 51 | + $ cd ../turbo_root_outputs_only |
| 52 | + $ ${TURBO} build --output-logs=hash-only |
| 53 | + • Packages in scope: turbo_root_outputs_only |
| 54 | + • Running build in 1 packages |
| 55 | + • Remote caching disabled |
| 56 | + turbo_root_outputs_only:build: cache miss, executing *hash* (glob) |
| 57 | + |
| 58 | + Tasks: 1 successful, 1 total |
| 59 | + Cached: 0 cached, 1 total |
| 60 | + Time: * (glob) |
| 61 | + |
| 62 | + $ test -f root-output.js |
| 63 | + $ cat root-output.js |
| 64 | + root output |
| 65 | + $ rm root-output.js |
| 66 | + |
| 67 | + $ ${TURBO} build --output-logs=hash-only |
| 68 | + • Packages in scope: turbo_root_outputs_only |
| 69 | + • Running build in 1 packages |
| 70 | + • Remote caching disabled |
| 71 | + turbo_root_outputs_only:build: cache hit, replaying output *hash* (glob) |
| 72 | + |
| 73 | + Tasks: 1 successful, 1 total |
| 74 | + Cached: 1 cached, 1 total |
| 75 | + Time: * (glob) |
| 76 | + |
| 77 | + $ test -f root-output.js |
| 78 | + $ cat root-output.js |
| 79 | + root output |
| 80 | + |
| 81 | +Test error when using $TURBO_ROOT$ in globalDependencies |
| 82 | + $ cd ../turbo_root_global_deps_error |
| 83 | + $ ${TURBO} build --output-logs=hash-only |
| 84 | + ERROR: $TURBO_ROOT$ syntax is not allowed in globalDependencies |
| 85 | + [1] |
0 commit comments