forked from h2oai/h2o-2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a version copied from h2o-test.
- Loading branch information
1 parent
4d0eca1
commit d4ac874
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import os, json, unittest, time, shutil, sys, getpass | ||
import h2o | ||
|
||
class TestJUnit(unittest.TestCase): | ||
|
||
def testAll(self): | ||
try: | ||
h2o.build_cloud(node_count=2) | ||
|
||
# we don't have the port or ip configuration here | ||
# that util/h2o.py does? Keep this in synch with spawn_h2o there. | ||
# also don't have --nosigar here? | ||
(ps, stdout, stderr) = h2o.spawn_cmd('junit', [ | ||
'java', | ||
'-Dh2o.arg.ice_root='+h2o.tmp_dir('ice.'), | ||
'-Dh2o.arg.name='+h2o.cloud_name(), | ||
'-Dh2o.arg.ip='+h2o.get_ip_address(), | ||
'-ea', '-jar', h2o.find_file('target/h2o.jar'), | ||
'-mainClass', 'org.junit.runner.JUnitCore', | ||
# The tests | ||
#'hex.GLMGridTest', | ||
'hex.HistogramTest', | ||
'hex.GLMTest', | ||
'hex.KMeansTest', | ||
'hex.MinorityClassTest', | ||
'hex.rf.RandomForestTest', | ||
'hex.rf.RFPredDomainTest', | ||
'water.AtomicTest', | ||
'water.AutoSerialTest', | ||
'water.BitCmpTest', | ||
#'water.ConcurrentKeyTest.java', | ||
'water.KeyToString', | ||
'water.KVTest', | ||
#'water.KVSpeedTest', | ||
'water.api.RStringTest', | ||
'water.exec.ExprTest', | ||
'water.exec.RBigDataTest', | ||
'water.parser.DatasetCornerCasesTest', | ||
'water.parser.ParseCompressedAndXLSTest', | ||
'water.parser.ParseFolderTest', | ||
'water.parser.ParseProgressTest', | ||
'water.parser.ParserTest', | ||
'water.parser.RReaderTest', | ||
'water.score.ScorePmmlTest', | ||
'water.score.ScoreTest' | ||
]) | ||
|
||
rc = ps.wait(None) | ||
out = file(stdout).read() | ||
err = file(stderr).read() | ||
if rc is None: | ||
ps.terminate() | ||
raise Exception("junit timed out.\nstdout:\n%s\n\nstderr:\n%s" % (out, err)) | ||
elif rc != 0: | ||
raise Exception("junit failed.\nstdout:\n%s\n\nstderr:\n%s" % (out, err)) | ||
|
||
finally: | ||
h2o.tear_down_cloud() | ||
|
||
|
||
if __name__ == '__main__': | ||
h2o.unit_main() |