Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ci/run_conditional_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ tests_with_credentials="core/packages/google-auth-library-nodejs/ packages/googl
# on Windows due to incompatible npm scripts.
#
# Until these packages can be updated to be OS agnostic, we will skip them on Windows.
windows_exempt_tests="core/ core/packages/ core/dev-packages/ .github/scripts/fixtures/ .github/scripts/tests/ core/packages/gapic-node-processing/ core/packages/typeless-sample-bot/"
windows_exempt_tests="core/ core/packages/ core/dev-packages/ .github/scripts/fixtures/ .github/scripts/tests/ core/packages/gapic-node-processing/ core/packages/typeless-sample-bot/ handwritten/cloud-profiler/"

for subdir in ${subdirs[@]}; do
for d in `ls -d ${subdir}/*/`; do
Expand Down Expand Up @@ -133,8 +133,8 @@ for subdir in ${subdirs[@]}; do
continue
fi

# Our CI uses Git Bash on Windows to execute this script, which returns "msys" for OSTYPE.
if [[ "$OSTYPE" == "msys" ]]; then
# Our CI uses Git Bash on Windows to execute this script, which returns "msys" or "cygwin" for OSTYPE.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turned out $OSTYPE is set to cygwin on the Windows GHA runners, which bypassed the original msys check. Adding cygwin and the $OS fallback makes sure we skip Windows-exempt tests correctly on both GHA and local setups.

  • Failed run where it triggered anyway link
  • Succeeded run with echo showing the value of OSTYPE link

if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OS" == "Windows_NT" ]]; then
if [[ "${windows_exempt_tests}" =~ "${d}" ]]; then
echo "Skipping ${d} on Windows (in exemption list)"
continue
Expand Down
4 changes: 2 additions & 2 deletions handwritten/cloud-profiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"scripts": {
"test": "echo 'skipping tests for time being'",
"test": "c8 mocha 'build/test/test-*.js'",
"system-test": "echo 'skipping tests for time being'",
"samples-test": "echo 'no sample tests'",
"clean": "gts clean",
Expand All @@ -20,7 +20,7 @@
"docs": "jsdoc -c .jsdoc.js",
"prelint": "cd samples; npm link ../; npm install",
"prepare": "npm run compile",
"pretest": "npm run compile",
"pretest": "npm run compile && node-gyp rebuild --directory node_modules/pprof",
"license-check": "jsgl --local .",
"precompile": "gts clean"
},
Expand Down
Loading