Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test file tst/tstall/profilefile.tst does not work in GitHub Actions Cygwin setup #97

Open
wilfwilson opened this issue Jan 28, 2022 · 1 comment

Comments

@wilfwilson
Copy link
Member

wilfwilson commented Jan 28, 2022

I am just going to put this here as a reminder.

As first mentioned #91 (comment) the test file tst/tstall/profilefile.tst does not work in the current Cygwin CI setup for GitHub Actions.

We're not sure why, and on @ChrisJefferson's computer it all worked fine. So for now, to benefit from the remainder of the Cygwin CI setup, we merged #91.

However, it might be good to occasionally revisit this.

Here's what the output looks like. I gave some more information in #91 (comment).

Architecture: x86_64-pc-cygwin-default64-kv8

testing: /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling/tst/tstall/pr\
ofilefile.tst
########> Diff in /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling\
/tst/tstall/profilefile.tst:12
# Input is:
str := ProfileFile(quicktest, rec(showOutput := false));;
# Expected output:
# But found:
Error, Unable to open file /tmp/gaptempdirBj9vAt/raw.json
########
########> Diff in /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling\
/tst/tstall/profilefile.tst:13
# Input is:
EndsWith(str, ".html");
# Expected output:
true
# But found:
Error, Variable: 'str' must have a value
########
########> Diff in /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling\
/tst/tstall/profilefile.tst:15
# Input is:
str := ProfileFile(runquicktest);;
# Expected output:
# But found:
Error, Unable to open file /tmp/gaptempdirufig9d/raw.json
########
########> Diff in /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling\
/tst/tstall/profilefile.tst:16
# Input is:
EndsWith(str, ".html");
# Expected output:
true
# But found:
Error, Variable: 'str' must have a value
########
########> Diff in /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling\
/tst/tstall/profilefile.tst:20
# Input is:
str := ProfilePackage("transgrp", rec(indir := "", showOutput := false));;
# Expected output:
# But found:
Error, Unable to open file /tmp/gaptempdirW63OIM/raw.json
########
########> Diff in /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling\
/tst/tstall/profilefile.tst:21
# Input is:
EndsWith(str, ".html");
# Expected output:
true
# But found:
Error, Variable: 'str' must have a value
########
      15 ms (0 ms GC) and 94.9KB allocated for /cygdrive/d/a/profiling/profili\
ng/gaproot/pkg/profiling/tst/tstall/profilefile.tst
-----------------------------------
total        15 ms (0 ms GC) and 94.9KB allocated
              6 failures in 1 of 1 files

Test failed: /cygdrive/d/a/profiling/profiling/gaproot/pkg/profiling/tst/tstal\
l/profilefile.tst
@wilfwilson
Copy link
Member Author

This is what @fingolfin said in #91 (comment):

I've added a HACK commit to inspect some values, and see this:

DEBUG: rawfile = /tmp/gaptempdirMa13Rc/raw.json
DEBUG: UserHomeExpand(rawfile) = /tmp/gaptempdirMa13Rc/raw.json
DEBUG: IsExistingFile(rawfile) = false
DEBUG: IsExistingFile(UserHomeExpand(rawfile)) = false
Error, Unable to open file /tmp/gaptempdirMa13Rc/raw.json

I think the Exec(cmd); call is problematic. It works by invoking a shell, and has windows specific code. If we rewrote that code to use Process, I think it would actually become easier to read and debug, would be less fragile and allow us to do fancy things like check the error code of the subprocess and report suitable error messages... :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant