def config(self): super(TarballTest, self).config() util.download_to(self.tar_url, self.local_tar, self.tar_md5, verbose=self.verbose) for arch in self.arches: for opt,debug in self.opts: if not os.path.exists(self.ref_dir(arch, opt)): util.untar_to(self.local_tar, self.ref_dir(arch, opt), verbose=self.verbose) util.patch(self.patch(arch, opt, debug, False), self.ref_dir(arch, opt), 1, verbose=self.verbose) if not os.path.exists(self.proto_dir(arch, opt)): util.untar_to(self.local_tar, self.proto_dir(arch, opt), verbose=self.verbose) util.patch(self.patch(arch, opt, debug, True), self.proto_dir(arch, opt), 1, verbose=self.verbose)
def handle_unit(args): cwd = os.path.join(os.path.abspath(os.curdir), 'test', 'unit') file_name = os.path.join(cwd, 'gtest-1.6.0.zip') util.download_to('http://googletest.googlecode.com/files/gtest-1.6.0.zip', file_name, '4577b49f2973c90bf9ba69aa8166b786', verbose=True) if not os.path.exists(os.path.join(cwd, 'gtest-1.6.0')): subprocess.check_call(['unzip', file_name, '-d', cwd]) util.make(cwd) bin = os.path.join(cwd, 'gtest_proto') subprocess.check_call([bin] + args, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr)
def handle_unit(args): cwd = os.path.join(os.path.abspath(os.curdir), 'test', 'unit') file_name = os.path.join(cwd, 'gtest-1.6.0.zip') util.download_to('http://googletest.googlecode.com/files/gtest-1.6.0.zip', file_name, '4577b49f2973c90bf9ba69aa8166b786', verbose=True) if not os.path.exists(os.path.join(cwd, 'gtest-1.6.0')): subprocess.check_call(['unzip', file_name, '-d', cwd]) util.make(cwd) bin = os.path.join(cwd, 'gtest_proto') subprocess.check_call([bin] + args, stdin = sys.stdin, stdout = sys.stdout, stderr = sys.stderr)