Skip to content

Commit

Permalink
fixup! feat(builtin): enable coverage on nodejs_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Wiles committed Sep 21, 2019
1 parent 8c6f0b9 commit 4f58839
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/node/node.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ def _nodejs_binary_impl(ctx):
env_vars += "export %s=\"%s\"\n" % (k, ctx.var[k])

# indicates that this was run with `bazel coverage`
# and that we should collect and store coverage
# TODO: store coverage in the location bazel tells us
if ctx.configuration.coverage_enabled:
# TODO: not sure if $RANDOM is the best var here
# but we need a new dir between runs
Expand Down
1 change: 1 addition & 0 deletions internal/node/node_launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ if [ "${EXPECTED_EXIT_CODE}" -eq "0" ]; then
# If we had merely forked a child process here, we'd be responsible
# for forwarding those OS interactions.
exec "${node}" "${NODE_OPTIONS[@]}" "${script}" "${ARGS[@]}"
# exec terminates execution of this shell script, nothing later will run.
fi

set +e
Expand Down

0 comments on commit 4f58839

Please sign in to comment.