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

tests: correctly test trim-current-directory #176

Merged
merged 1 commit into from
May 21, 2024

Conversation

benknoble
Copy link
Contributor

@benknoble benknoble commented May 21, 2024

Now that current-test-invocation-directory is set in parallel mode, this test case fails in DrDr environments with something like

--------------------
trim-current-directory strips directory from files in current directory
FAILURE
name:       check-equal?
location: /opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/check-info-test.rkt:147:4
actual: "/opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/foo.rkt"
expected:   "foo.rkt"
--------------------
--------------------
trim-current-directory leaves subdirectories alone
FAILURE
name:       check-equal?
location: /opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/check-info-test.rkt:152:4
actual: "/opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/foo/bar.rkt"
expected:   "foo/bar.rkt"
--------------------

Instead of trying to make the tests deal with DrDr's environment, set the current-test-invocation-directory for these tests to the current-directory. In other words: when testing the tester, work around the (meta?) tester to be properly agnostic.

Best viewed with: --ignore--all-space

This should fixup comments on #175 (comment).

Now that current-test-invocation-directory is set in parallel mode, this
test case fails in DrDr environments with something like

--------------------
trim-current-directory strips directory from files in current directory
FAILURE
name:       check-equal?
location: /opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/check-info-test.rkt:147:4
actual: "/opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/foo.rkt"
expected:   "foo.rkt"
--------------------
--------------------
trim-current-directory leaves subdirectories alone
FAILURE
name:       check-equal?
location: /opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/check-info-test.rkt:152:4
actual: "/opt/plt/builds/<current-rev>/trunk/racket/share/pkgs/rackunit-test/tests/rackunit/foo/bar.rkt"
expected:   "foo/bar.rkt"
--------------------

Instead of trying to make the tests deal with DrDr's environment, set
the current-test-invocation-directory for these tests to the
current-directory. In other words: when testing the tester, work around
the (meta?) tester to be properly agnostic.

Best viewed with: --ignore--all-space

This should fixup problems with racket#175 (comment)
@samth samth merged commit 899665a into racket:master May 21, 2024
2 checks passed
@benknoble benknoble deleted the fixup-check-info-test branch May 21, 2024 18:03
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

Successfully merging this pull request may close these issues.

None yet

2 participants