-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-531] Integration Test for Scala #11596
Conversation
4c89fda
to
6ef39a7
Compare
@marcoabreu I didn't see the integration test section in our CI pipeline. Have we merged them together in 1 test phase? |
Makefile
Outdated
-Dcflags="$(CFLAGS)" -Dldflags="$(LDFLAGS)" \ | ||
-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a" $(SCALA_TEST_ARGS)) | ||
|
||
scalaintegrationtest: |
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.
where do you specify to run tests only under examples ? does it also run unit tests?
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.
Currently, all unit test are run on integration-test
stage in Maven and all integration test runs in verify
stage.
Yes, it runs unit test as well
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.
I am not sure I see the benefit of creating another stage that runs twice. Am I missing anything ? consider adding the test phase in examples under a maven profile which can passed when you call make integrationtests ?
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.
It works like this way:
if you put test in the test
phase, test will be running in test
, package
and all after phases.
If you put test in the integration-test
, test will be running in verify
, but not in package
.
So it is impossible to keep test runs on a individual phase.
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.
Some alternative is applicable for tests done in Java. However we are using scalatest
plugin, the plugins for Java surefire cannot used in here.
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.
Can you not run verify
of examples under a called profile integration-test
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.
Now there is no verify. Only Integration test.
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.
I tried to centralize the two profiles in the main pom file instead of changing these properties in every module. The test plugins are spread in all the modules, After cleaning them and adding two profiles in the main pom configuration. The tests are now segfaulting, not sure what is causing. I will stop this effort here and we can see later.
6ef39a7
to
034308a
Compare
good to me |
034308a
to
ffdca8b
Compare
@@ -593,9 +593,15 @@ scalapkg: | |||
-Dcurrent_libdir="$(ROOTDIR)/lib" \ | |||
-Dlddeps="$(LIB_DEP) $(ROOTDIR)/lib/libmxnet.a") | |||
|
|||
scalatest: | |||
scalaunittest: |
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.
remember to update README
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.
Changed the README
in the scala package.
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.
I didn't notice. my bad..
Yes, the Scala integration tests are now in parallel with the unit tests. At some point we might move them to nightly, but for now, you don't have to worry but just categorize the tests properly. |
ffdca8b
to
cd3017a
Compare
@lanking520 thanks for separating the tests into two phases, this definitely helps in speeding up the CI pipeline. |
@@ -712,18 +712,6 @@ try { | |||
} | |||
} | |||
}, | |||
'Scala: GPU': { |
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.
@nswamy @lanking520 was this intentional? I think you just disabled all unit tests for Scala on GPU ._.
@@ -979,6 +967,18 @@ try { | |||
} | |||
} | |||
} | |||
}, | |||
'Scala: GPU': { |
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.
Please name this Scala Integration: GPU
Could you elaborate, naveen? When running integration tests, does it automatically cover unit tests as well? I'm afraid merging them will
|
@marcoabreu You are right, the CPU should be called as Scala Unit test CPU. Currently, we do not have any unit test running on GPU. Only some tests in integration test run GPU. I will amend with another PR to add this fixes. |
* Separate unit test and integration tests for Scala
Description
This is an approach for us to do integration test on Scala. As more of the examples are adding in the Scala CI, we need a separation between tests to make sure it test different things. However, this solution is not perfect due to this fact:
I have placed
verify
stage on theexample
module and change the unit test to integration test. If we run the verify stage, the unit test will still be run though it takes us 1 ~ 2 minutes to finish them.@nswamy @marcoabreu @yzhliu @andrewfayres
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments