Skip to content

Commit

Permalink
fix: make separate 'test:xs' target, remove XS from 'test' target
Browse files Browse the repository at this point in the history
Running `yarn test` from the top level causes `yarn test` to be
run in each workspace.

Previously, in some packages (zoe and ERTP in particular), the local `yarn
test` expanded into doing both `test:node` and `test:xs`.

This introduces a new top-level `yarn test:xs` target, which runs `yarn
test:xs` in each workspace. Zoe and ERTP's local `yarn test` was changed to
only run the node tests. Zoe and ERTP 's local `yarn test:xs` runs the unit
tests under XS. All other packages have a no-op `exit 0` in their `test:xs`
target, so the top-level target doesn't crash when it encounters a package
that doesn't have any XS-specific testing (which is most of them).

With this change, CI will stop testing XS on each run. We'll follow up with a
separate change that tells CI to do a top-level `yarn test:xs`, probably with
a flag that makes the success optional (don't flunk a PR if it fails the XS
tests, for now).

refs #2647
  • Loading branch information
warner committed Mar 15, 2021
1 parent 35fceb1 commit e8c92b6
Show file tree
Hide file tree
Showing 41 changed files with 45 additions and 7 deletions.
1 change: 1 addition & 0 deletions golang/cosmos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"build:gyp": "make compile-gyp",
"build:gyp-debug": "make compile-gyp GYP_DEBUG=--debug",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"build": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"lint-check": "yarn workspaces run lint-check",
"lint": "yarn workspaces run lint-check",
"test": "yarn workspaces run test",
"test:xs": "yarn workspaces run test:xs",
"build": "yarn workspaces run build",
"postinstall": "patch-package",
"patch-package": "patch-package",
Expand Down
3 changes: 1 addition & 2 deletions packages/ERTP/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
},
"scripts": {
"build": "exit 0",
"test": "yarn test:node && yarn test:xs",
"test:node": "ava",
"test": "ava",
"test:xs": "yarn test:xs-unit && yarn test:xs-worker",
"test:xs-unit": "ava-xs",
"test:xs-worker": "WORKER_TYPE=xs-worker ava",
Expand Down
1 change: 1 addition & 0 deletions packages/SwingSet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "exit 0",
"test:xs-worker": "ava test/workers/test-worker.js -m 'xs vat manager'",
"pretty-fix": "prettier --write '**/*.js'",
"pretty-check": "prettier --check '**/*.js'",
Expand Down
1 change: 1 addition & 0 deletions packages/acorn-eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/agoric-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"scripts": {
"build": "exit 0",
"test": "ava --config .ava-unit-test.config.js",
"test:xs": "exit 0",
"integration-test": "ava --config .ava-integration-test.config.js",
"lint-check": "eslint '**/*.{js,jsx}'",
"lint-fix": "eslint --fix '**/*.{js,jsx}'"
Expand Down
1 change: 1 addition & 0 deletions packages/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "exit 0",
"test:nyc": "exit 0",
"test:xs": "exit 0",
"lint-fix": "yarn lint --fix",
"lint-check": "yarn lint",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
3 changes: 2 additions & 1 deletion packages/base64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"lint-fix": "eslint --fix '**/*.js'",
"prepublish": "yarn clean && yarn build",
"test": "ava",
"test:nyc": "nyc ava"
"test:nyc": "nyc ava",
"test:xs": "exit 0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^6.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'",
"lint-fix-jessie": "eslint -c '.eslintrc-jessie.js' --fix '**/*.js'",
Expand Down
1 change: 1 addition & 0 deletions packages/captp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint 'lib/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/cosmic-swingset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"pretty-fix": "prettier --write '**/*.js'",
"pretty-check": "prettier --check '**/*.js'",
"lint-fix": "yarn lint --fix",
Expand Down
1 change: 1 addition & 0 deletions packages/dapp-svelte-wallet/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "exit 0",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "yarn lint --fix",
"lint-check": "yarn lint",
Expand Down
1 change: 1 addition & 0 deletions packages/dapp-svelte-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"lint-fix": "exit 0",
"lint-check": "exit 0",
"test": "exit 0",
"test:xs": "exit 0",
"build": "exit 0"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/dapp-svelte-wallet/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"lint-check": "yarn lint",
"lint-fix": "exit 0",
"lint": "exit 0",
"test": "exit 0"
"test": "exit 0",
"test:xs": "exit 0"
},
"devDependencies": {
"@agoric/captp": "^1.7.2",
Expand Down
1 change: 1 addition & 0 deletions packages/deploy-script-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"pretty-fix": "prettier --write '**/*.js'",
"pretty-check": "prettier --check '**/*.js'",
"lint-fix": "yarn lint --fix",
Expand Down
1 change: 1 addition & 0 deletions packages/deployment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"main": "main.js",
"scripts": {
"test": "exit 0",
"test:xs": "exit 0",
"build": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"scripts": {
"test": "exit 0",
"test:nyc": "exit 0",
"test:xs": "exit 0",
"build": "exit 0",
"lint-fix": "exit 0",
"lint-check": "exit 0"
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"main": "lib/index.js",
"scripts": {
"test": "exit 0",
"test:xs": "exit 0",
"build": "exit 0",
"lint-fix": "exit 0",
"lint-check": "exit 0"
Expand Down
1 change: 1 addition & 0 deletions packages/eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"build": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
Expand Down
1 change: 1 addition & 0 deletions packages/import-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"scripts": {
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"build": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
Expand Down
1 change: 1 addition & 0 deletions packages/import-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/install-metering-and-ses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/install-ses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/marshal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"pretty-fix": "prettier --write '**/*.js'",
"pretty-check": "prettier --check '**/*.js'",
"lint-fix": "yarn lint --fix",
Expand Down
1 change: 1 addition & 0 deletions packages/notifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "yarn lint --fix",
"lint-check": "yarn lint",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
1 change: 1 addition & 0 deletions packages/promise-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"build": "exit 0",
"test": "exit 0",
"test:xs": "exit 0",
"lint-fix": "yarn lint --fix",
"lint-check": "yarn lint",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
1 change: 1 addition & 0 deletions packages/registrar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/same-structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"build": "exit 0",
"test": "exit 0",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/sharing-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/sparse-ints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"build": "exit 0",
"test": "exit 0",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/spawner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/stat-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"build": "exit 0",
"test": "exit 0",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "exit 0",
"lint-fix": "yarn lint --fix",
"lint-check": "yarn lint",
"lint": "yarn lint:types && yarn lint:eslint",
Expand Down
1 change: 1 addition & 0 deletions packages/swing-store-lmdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/swing-store-simple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/swingset-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"build": "exit 0",
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'",
"ci:autobench": "./autobench"
Expand Down
1 change: 1 addition & 0 deletions packages/tame-metering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.{js,jsx}'",
"lint-check": "eslint '**/*.{js,jsx}'",
"build": "exit 0"
Expand Down
1 change: 1 addition & 0 deletions packages/transform-eventual-send/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'",
"build": "exit 0"
Expand Down
1 change: 1 addition & 0 deletions packages/transform-metering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"test": "ava",
"test:nyc": "nyc ava",
"test:xs": "exit 0",
"lint-fix": "eslint --fix '**/*.{js,jsx}'",
"lint-check": "eslint '**/*.{js,jsx}'",
"build": "exit 0"
Expand Down
3 changes: 2 additions & 1 deletion packages/xsnap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"lint:types": "tsc -p jsconfig.json",
"lint-fix": "eslint --fix 'src/**/*.js' 'lib/**/*.js'",
"lint-check": "yarn lint",
"test": "ava"
"test": "ava",
"test:xs": "exit 0"
},
"dependencies": {
"@agoric/assert": "^0.2.2-dev.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/zoe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"scripts": {
"build": "yarn build-zcfBundle",
"test": "yarn test:node && yarn test:xs-unit",
"test:node": "ava --verbose",
"test": "ava --verbose",
"test:nyc": "nyc ava",
"test:xs": "yarn test:xs-unit",
"test:xs-unit": "ava-xs --verbose",
"test:xs-unit-debug": "ava-xs --debug",
"test:xs-worker": "WORKER_TYPE=xs-worker ava",
Expand Down

0 comments on commit e8c92b6

Please sign in to comment.