You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2012/11/22 05:08:42 UTC

svn commit: r1412416 - /hive/trunk/testutils/ptest/hivetest.py

Author: namit
Date: Thu Nov 22 04:08:41 2012
New Revision: 1412416

URL: http://svn.apache.org/viewvc?rev=1412416&view=rev
Log:
HIVE-3735 PTest doesn't work due to hive snapshot version upgrade to 11
(Gang Tim Liu via namit)


Modified:
    hive/trunk/testutils/ptest/hivetest.py

Modified: hive/trunk/testutils/ptest/hivetest.py
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/ptest/hivetest.py?rev=1412416&r1=1412415&r2=1412416&view=diff
==============================================================================
--- hive/trunk/testutils/ptest/hivetest.py (original)
+++ hive/trunk/testutils/ptest/hivetest.py Thu Nov 22 04:08:41 2012
@@ -176,7 +176,7 @@ def get_clean_hive():
       local.run('git reset --hard HEAD')
       local.run('git clean -dffx')
       local.run('git pull')
-    
+
     local.run('ant arc-setup')
 
 def copy_local_hive():
@@ -246,7 +246,7 @@ def propagate_hive():
     remote_set.run('cp -r "{0}/*" "{1}"'.format(
                     code_path, host_code_path))
 
-    # It should avoid issues with 'ivy publish' exceptions during testing phase. 
+    # It should avoid issues with 'ivy publish' exceptions during testing phase.
     remote_set.run('cp -r "{0}" "{1}"'.format(ivy_path, host_code_path))
 
 
@@ -312,7 +312,7 @@ def run_tests():
     # irrelevant if one of the first tests fails and Ant reports a failure after
     # running all the other test, fortunately JUnit report saves the Ant output
     # if you need it for some reason).
-    
+
     remote_ivy_path = '$(pwd)/.ivy2'
 
     qfile_set.cd(host_code_path)
@@ -481,7 +481,7 @@ def save_patch():
     local.cd(code_path)
     local.run('git add --all')
     local.run('git diff --no-prefix HEAD > "{0}"'.format(report_path + '/patch'))
-  
+
 # -- Tasks that can be called from command line start here.
 
 def cmd_prepare(patches = [], revision = None):
@@ -521,8 +521,9 @@ def cmd_test(patches = [], revision = No
       local.run('rm -rf "' + master_base_path + '/templogs/"')
       local.run('mkdir -p "' + master_base_path + '/templogs/"')
       tests = ['TestRemoteHiveMetaStore','TestEmbeddedHiveMetaStore','TestSetUGIOnBothClientServer','TestSetUGIOnOnlyClient','TestSetUGIOnOnlyServer']
+      
       for test in tests:
-        local.run('sudo -u hadoop ant -Dtestcase=' + test + ' test')
+        local.run('sudo -u root ant -Divy.default.ivy.user.dir={0} '.format(ivy_path) + ' -Dtestcase=' + test + ' test')
         local.run('cp "`find . -name "TEST-*.xml"`" "' + master_base_path + '/templogs/"')
 
     cmd_run_tests(one_file_report)
@@ -594,6 +595,6 @@ elif args.stop:
     cmd_stop()
 elif args.remove:
     cmd_remove()
-else: 
+else:
   parser.print_help()