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

It would be awesome to pass commands to the test engine to do matching #5

Open
elsigh opened this issue Apr 20, 2015 · 4 comments
Open

Comments

@elsigh
Copy link

elsigh commented Apr 20, 2015

I'm using TapTestEngine to execute a command like grunt test which tests some js code. But I'd like to only run that test if one of the changed files matches some sort of regex. It seems like arc wants that logic to be part of the Test Engine, so maybe this could be implemented with unit.engine.tap.regex or something?

@elsigh
Copy link
Author

elsigh commented Apr 20, 2015

Or maybe include/exclude?

@reu
Copy link
Member

reu commented Apr 21, 2015

Yeah, it could be a very useful feature, and it should work for any test engine IMO.

Unfortunately I think that it won't be that easy to properly implement this, so for now, I am accepting PRs =]

@elsigh
Copy link
Author

elsigh commented Apr 21, 2015

Curious why you don't think it will be too easy?
I'm happy to take a crack at it and I'm just imaging code like this in run():

$regex = $this->getConfigurationManager()->getConfigFromAnySource('unit.engine.tap.regex');
$this->affectedTests = array();
foreach ($this->getPaths() as $path) {
if (preg_match($regex, $path)) {
// Looks like a valid test file name.
$this->affectedTests[$path] = $path;
continue;
}
}

and then bail if affectedTests is empty.

but I might be oversimplifying it and not understanding something too..

(heavily cribbed from https://github.com/phacility/arcanist/blob/master/src/unit/engine/PhpunitTestEngine.php)

@elsigh
Copy link
Author

elsigh commented Apr 27, 2015

I'll have a PR today for this.

jiparis pushed a commit to jiparis/arcanist-extensions that referenced this issue Jul 19, 2016
Remove ID selector warning for SCSS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants