~linaro-validation/lava-android-test/trunk

« back to all changes in this revision

Viewing changes to lava_android_test/main.py

  • Committer: Yongqin Liu
  • Date: 2012-03-13 02:08:24 UTC
  • mfrom: (140.2.4 lava-android-test)
  • Revision ID: yongqin.liu@linaro.org-20120313020824-t3ni2llkwhyq53be
merge with the branch that support custom android command 

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                              " command to PATH environment.")
45
45
        sys.exit(1)
46
46
 
 
47
    config = get_config()
47
48
    try:
48
 
        config = get_config()
49
49
        if not os.path.exists(config.tempdir_host):
50
50
            os.makedirs(config.tempdir_host)
 
51
            #make every user can write/read this directory
 
52
            os.chmod(config.tempdir_host, 0777)
51
53
        config.tempdir_host = mkdtemp(dir=config.tempdir_host)
52
54
        set_config(config)
53
55
        os.chmod(config.tempdir_host, 0755)
54
56
        run_with_dispatcher_class(LAVAAndroidTestDispatcher)
55
57
    finally:
 
58
        #can't remove the parent directory, because there may be other
 
59
        #instance using the parent directory
56
60
        shutil.rmtree(config.tempdir_host)
57
61
 
58
62