> On Sept. 15, 2016, 5:55 p.m., Laszlo Puskas wrote:
> > ambari-server/src/test/python/unitTests.py, line 158
> > <https://reviews.apache.org/r/51914/diff/1/?file=1498877#file1498877line158>
> >
> >     Is the second conditin required here?

It turns out to be unnecessary (as long as the script is invoked via Maven).  
Tested with `-Dpython.test.mask=''`, the python script is not even invoked, 
Maven fails with this message:

```
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 
(python-test) on project ambari-server: Misconfigured argument, value is null. 
Set the argument to an empty value if this is the required behaviour.
```

Same result if the value is set to empty in the `pom.xml`.


- Attila


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51914/#review149069
-----------------------------------------------------------


On Sept. 15, 2016, 4:44 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51914/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2016, 4:44 p.m.)
> 
> 
> Review request for Ambari, Balázs Bence Sári, Laszlo Puskas, Oliver Szabo, 
> and Sebastian Toader.
> 
> 
> Bugs: AMBARI-18401
>     https://issues.apache.org/jira/browse/AMBARI-18401
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> * Implement the Surefire approach for filtering unit tests to be run for 
> Python.
>  * Keep backward-compatibility for `custom.tests` flag and default test mask
> 
> 
> Diffs
> -----
> 
>   ambari-server/pom.xml 323ce22 
>   ambari-server/src/test/python/unitTests.py 037b6a5 
> 
> Diff: https://reviews.apache.org/r/51914/diff/
> 
> 
> Testing
> -------
> 
> ```bash
> git apply --include ambari-server/src/test/python/unitTests.py 
> AMBARI-18401_20160915_v1.patch
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run (1126 as of now)
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run (2 tests as of now)
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> git apply --include ambari-server/pom.xml AMBARI-18401_20160915_v1.patch
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip 
> -Dpython.test.mask='TestS*py'
> # -> verify only TestServerClassPath...TestStackFeature were run (30 tests in 
> 6 files as of now)
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>

Reply via email to