-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use test_runner for tests #3268
Conversation
test_runner.cmd
Outdated
@@ -0,0 +1,2 @@ | |||
@ECHO OFF | |||
@ruby.exe -x "%~dpn0" %* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What magic is this? 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows fun!
Actually, something very similar is generated by RubyGems when it creates Windows bin stubs.
With *nix systems, one has executable permissions and shebang lines.
On Windows, the extension determines whether a file is executable.
%*
is equivalent to ARGV
, and %~dpn0
is equivalent to File.basename(__FILE__, '.*')
So, in this instance it is equivalent to ruby.exe -x "test_runner" ARGV
0109e71
to
22ee732
Compare
Apologies for making this a draft PR. GitHub desktop retains PR settings, and my last PR (#3267) was a draft. Rebased, and fixed a double space in test.yaml:
|
Ok, I did say "More functionality can be added in the future.". One question, one update...
|
|
22ee732
to
f2b829e
Compare
Moved the file and added ability to add a files argument. See comments in the file. Can be a single file, a glob, or a list... |
Sorry. I didn't set the executable bit, as Git has a special command for setting it on Windows systems. I've always used GitHub desktop on Windows for most operations, along with GIT cli... |
f2b829e
to
9dffc06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻👌🏻
With the new runner, running tests shows one main process:
With
Saving people the time of scrolling the above script window, the 2nd process is:
With every test file (in quotes) following it as arguments. Or, it's really pretty in a console window when it wraps... I've also found this helps speed things up in a shell script I use to run each test file individually, in particular with JRuby. @nateberkopec Any thoughts? |
9dffc06
to
204d0ee
Compare
I updated the code to properly handle arguments like |
Description
Currently
rake
is used to run tests.rake
creates a main process, and runs tasks in sub-processes. This allows chaining tasks, as we do, allowingcompile
to run beforetest
.CI systems' resources are limited, and probably much smaller than most dev's local PC's.
The PR creates two files for test runners (
test_runner.cmd
is used only on Windows) and uses them in the Actions CI test.yaml script.Note that
test_runner
runs the full test suite. So, for local testing, using other code should still be used, unless one is very familiar with minitest, etc. More functionality can be added in the future.Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.