def testConfigInstallProjectInstall(self):
     args = ["--root=%s" % self.siteroot, "--repo=%s" % self.repourl, "Brunel", "v43r1p1"]
     client = InstallProjectClient(TESTCONFIG, args)
     rc =  client.main()
     self.assertEquals(rc, 0)
     for path in [ "lhcb/BRUNEL/BRUNEL_v43r1p1"]:
         self.assertTrue(os.path.exists(os.path.join(self.siteroot, path)))
示例#2
0
 def testInstallProjectClientNobin(self):
     os.environ['CMTCONFIG'] = "MYCONFIG"
     client = InstallProjectClient(TESTCONFIG, ["BRUNEL", "vXrY"], True)
     rc = client.main()
     self.assertEquals(rc, 0)
     self.assertEquals(client.runMethod, "install")
     self.assertEquals(client.runArgs[0], "BRUNEL")
     self.assertEquals(client.runArgs[1], "vXrY")
     self.assertEquals(client.runArgs[2], None)
示例#3
0
 def testInstallProjectClientCmdlineBin(self):
     os.environ['CMTCONFIG'] = "MYCONFIG"
     client = InstallProjectClient(TESTCONFIG, ["--binary=TOTO", "BRUNEL"], True)
     rc = client.main()
     self.assertEquals(rc, 0)
     self.assertEquals(client.runMethod, "install")
     self.assertEquals(client.runArgs[0], "BRUNEL")
     self.assertEquals(client.runArgs[1], None)
     self.assertEquals(client.runArgs[2], "TOTO")
示例#4
0
 def testInstallProjectClientNobin(self):
     os.environ['CMTCONFIG'] = "MYCONFIG"
     client = InstallProjectClient(TESTCONFIG, ["BRUNEL", "vXrY"], True)
     rc = client.main()
     self.assertEquals(rc, 0)
     self.assertEquals(client.runMethod, "install")
     self.assertEquals(client.runArgs[0], "BRUNEL")
     self.assertEquals(client.runArgs[1], "vXrY")
     self.assertEquals(client.runArgs[2], None)
示例#5
0
 def testInstallProjectClientCmdlineBin(self):
     os.environ['CMTCONFIG'] = "MYCONFIG"
     client = InstallProjectClient(TESTCONFIG, ["--binary=TOTO", "BRUNEL"],
                                   True)
     rc = client.main()
     self.assertEquals(rc, 0)
     self.assertEquals(client.runMethod, "install")
     self.assertEquals(client.runArgs[0], "BRUNEL")
     self.assertEquals(client.runArgs[1], None)
     self.assertEquals(client.runArgs[2], "TOTO")
示例#6
0
 def testInstallProjectClientBadBin(self):
     if 'CMTCONFIG' in os.environ.keys():
         del os.environ['CMTCONFIG']
     client = InstallProjectClient(TESTCONFIG, ["-b", "BRUNEL"], True)
     rc = client.main()
     self.assertEquals(rc, 1)
示例#7
0
 def testArgParsing(self):
     parser = InstallProjectClient(TESTCONFIG).parser
     opts, args = parser.parse_args(["-b", "-d", "x", "titi", "toto"]) #@UnusedVariable
     self.assertTrue(opts.useCMTCONFIG)
示例#8
0
 def testOptsBinaryShort(self):
     parser = InstallProjectClient(TESTCONFIG).parser
     opts, args = parser.parse_args(["-b"]) #@UnusedVariable
     self.assertTrue(opts.useCMTCONFIG)
示例#9
0
 def testOptsBinary(self):
     parser = InstallProjectClient(TESTCONFIG).parser
     opts, args = parser.parse_args(["--binary=xbin"]) #@UnusedVariable
     self.assertEquals(opts.binary, "xbin")
示例#10
0
 def testInstallProjectClientBadBin(self):
     if 'CMTCONFIG' in os.environ.keys():
         del os.environ['CMTCONFIG']
     client = InstallProjectClient(TESTCONFIG, ["-b", "BRUNEL"], True)
     rc = client.main()
     self.assertEquals(rc, 1)
示例#11
0
 def testArgParsing(self):
     parser = InstallProjectClient(TESTCONFIG).parser
     opts, args = parser.parse_args(["-b", "-d", "x", "titi",
                                     "toto"])  #@UnusedVariable
     self.assertTrue(opts.useCMTCONFIG)
示例#12
0
 def testOptsBinaryShort(self):
     parser = InstallProjectClient(TESTCONFIG).parser
     opts, args = parser.parse_args(["-b"])  #@UnusedVariable
     self.assertTrue(opts.useCMTCONFIG)
示例#13
0
 def testOptsBinary(self):
     parser = InstallProjectClient(TESTCONFIG).parser
     opts, args = parser.parse_args(["--binary=xbin"])  #@UnusedVariable
     self.assertEquals(opts.binary, "xbin")