if doCompile:
  # Compile, but only send output to stdout if it fails:
  print 'Compile...'
  try:
    if os.getcwd().endswith('lucene'):
      res = os.system('%s compile-core compile-test > %s/compile.log 2>&1' % (constants.ANT_EXE, logDirName))
    else:
      res = os.system('%s compile-test > %s/compile.log 2>&1' % (constants.ANT_EXE, logDirName))
    if res:
      print open('%s/compile.log' % logDirName, 'rb').read()
      sys.exit(1)
  finally:
    os.remove('%s/compile.log' % logDirName)

#JAVA_ARGS += ' -XX:+HeapDumpOnOutOfMemoryError -agentlib:yjpagent=alloceach=10,allocsizelimit=1024 -cp "%s"' % common.pathsep().join(common.getLuceneTestClassPath(ROOT))
JAVA_ARGS += ' -XX:+HeapDumpOnOutOfMemoryError -cp "%s"' % common.pathsep().join(common.getLuceneTestClassPath(ROOT))

failed = False

iterLock = threading.Lock()
iter = 0

def nextIter(threadID, logFileName, secLastIter):
  global iter
  
  with iterLock:
    print
    if logFileName is None:
      print '%s [%d, jvm %d, %5.1fs]:' % (datetime.datetime.now(), iter, threadID, secLastIter)
    else:
      print '%s [%d, jvm %d, %5.1fs]: %s' % (datetime.datetime.now(), iter, threadID, secLastIter, logFileName)
Example #2
0
 def classPathToString(self, cp):
   return common.pathsep().join(cp)
Example #3
0
    try:
        if os.getcwd().endswith('lucene'):
            res = os.system(
                '%s compile-core compile-test > %s/compile.log 2>&1' %
                (constants.ANT_EXE, logDirName))
        else:
            res = os.system('%s compile-test > %s/compile.log 2>&1' %
                            (constants.ANT_EXE, logDirName))
        if res:
            print open('%s/compile.log' % logDirName, 'rb').read()
            sys.exit(1)
    finally:
        os.remove('%s/compile.log' % logDirName)

#JAVA_ARGS += ' -XX:+HeapDumpOnOutOfMemoryError -agentlib:yjpagent=alloceach=10,allocsizelimit=1024 -cp "%s"' % common.pathsep().join(common.getLuceneTestClassPath(ROOT))
JAVA_ARGS += ' -XX:+HeapDumpOnOutOfMemoryError -cp "%s"' % common.pathsep(
).join(common.getLuceneTestClassPath(ROOT))

failed = False

iterLock = threading.Lock()
iter = 0


def nextIter(threadID, logFileName, secLastIter):
    global iter

    with iterLock:
        print
        if logFileName is None:
            print '%s [%d, jvm %d, %5.1fs]:' % (datetime.datetime.now(), iter,
                                                threadID, secLastIter)
if len(sys.argv) == 1:
  print '\nERROR: no test specified\n'
  sys.exit(1)

tests = []
for test in sys.argv[1:]:
  if not test.startswith('org.'):
    tup = common.locateTest(test)
    if tup is None:
      print '\nERROR: cannot find test %s\n' % test
      sys.exit(1)
    testClass, testMethod = tup
    tests.append((testClass, testMethod))

JAVA_ARGS += ' -cp "%s"' % common.pathsep().join(common.getLuceneTestClassPath(ROOT))
OLD_JUNIT = os.path.exists('lib/junit-3.8.2.jar')

failed = False

iterLock = threading.Lock()
iter = 0

def nextIter(threadID, logFileName):
  global iter
  
  with iterLock:
    print
    if logFileName is None:
      print '%s [%d, thread %d]:' % (datetime.datetime.now(), iter, threadID)
    else:
Example #5
0
if len(sys.argv) == 1:
    print '\nERROR: no test specified\n'
    sys.exit(1)

tests = []
for test in sys.argv[1:]:
    if not test.startswith('org.'):
        tup = common.locateTest(test)
        if tup is None:
            print '\nERROR: cannot find test %s\n' % test
            sys.exit(1)
        testClass, testMethod = tup
        tests.append((testClass, testMethod))

JAVA_ARGS += ' -cp "%s"' % common.pathsep().join(
    common.getLuceneTestClassPath(ROOT))
OLD_JUNIT = os.path.exists('lib/junit-3.8.2.jar')

failed = False

iterLock = threading.Lock()
iter = 0


def nextIter(threadID, logFileName):
    global iter

    with iterLock:
        print
        if logFileName is None:
            print '%s [%d, thread %d]:' % (datetime.datetime.now(), iter,
Example #6
0
 def classPathToString(self, cp):
   return common.pathsep().join(cp)