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 runner does not work with '--keep-temp-file' option #357

Closed
sergeyklay opened this issue Jun 15, 2021 · 8 comments
Closed

Tests runner does not work with '--keep-temp-file' option #357

sergeyklay opened this issue Jun 15, 2021 · 8 comments

Comments

@sergeyklay
Copy link
Collaborator

sergeyklay commented Jun 15, 2021

Hello,

I recently started working on tests runner in Python (see #331 (comment)). Today I wanted to check that I handle --keep-temp-file option correctly. So I ran the original run_tests.sh script to see how it works. Unfortunately I found it was not working:

$ ./run_tests.sh --keep-temp-file
Running in 8 thread(s)
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
find: *: No such file or directory
find: test_210615102401: No such file or directory
-----------------
All:         0
Ran:         0
Passed:      0
Soft errors: 0
Hard errors: 0
-----------------
PASSED

Everything works like a charm without --keep-temp-file option. Here is some info about my environment:

$ bash --version
GNU bash, version 5.1.8(1)-release (aarch64-apple-darwin20.4.0)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ cp --version
cp (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.

I used to branch this commit: 4a89dc2 and I have not changed run_tests.sh file on my branch. Let me know if I can provide more info or step by step steps to reproduce .

@skvadrik
Copy link
Owner

I recently started working on tests runner in Python (see #331 (comment)).

\o/

I removed --keep-tmp-files option some time ago (in ec9eecd) because it was never used in practice, but I forgot to remove its description. Done now: f710983.

@sergeyklay
Copy link
Collaborator Author

I removed --keep-tmp-files option some time ago (in ec9eecd) because it was never used in practice, but I forgot to remove its description.

Oh, right now I needed it to catch the bug :D Ok, at least I don't have to implement this in Python. Thank you for the quick fix.

@skvadrik
Copy link
Owner

If it's useful, you can restore it by all means. :) Just revert those two commits.

@skvadrik
Copy link
Owner

I said it's not useful because when a test fails, it automatically keeps temporary files. And keeping files for tests that passed is normally not required.

@sergeyklay
Copy link
Collaborator Author

But it's useful for debugging test runner itself :)

@skvadrik
Copy link
Owner

Yes, sure! Let's restore it.

@skvadrik
Copy link
Owner

Here it is (restored): 5de6ae6.

@sergeyklay
Copy link
Collaborator Author

Thank you!

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

2 participants