Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix broken tests since last rebase

Change-Id: If30d764d2be036a6be6eb38ad774255fa50ba5d7
  • Loading branch information...
commit 9322920f4d9694cc70c2ec4e469ace9b0ca5f3f4 1 parent 8addd34
@dmerejkowsky authored
View
17 python/qibuild/test/test_config_wizard.py
@@ -358,11 +358,10 @@ def test_unsetting_unique_build_dir(self):
})
self.setup_generators(["Unix Makefiles"])
self.setup_tc_names(list())
- work_tree = os.path.join(self.tmp, "work_tree")
- toc = qibuild.toc.Toc(work_tree=work_tree)
- self.run_wizard(toc=toc)
- self.assertEqual(toc.config.local.build.build_dir, "build")
- self.assertEqual(toc.config.local.build.sdk_dir, "sdk")
+ old_toc = qibuild.toc.toc_open(self.tmp)
+ self.run_wizard(toc=old_toc)
+ self.assertEqual(old_toc.config.local.build.build_dir, "build")
+ self.assertEqual(old_toc.config.local.build.sdk_dir, "sdk")
self.interact_patcher.stop()
self.setup_answers({
@@ -372,10 +371,10 @@ def test_unsetting_unique_build_dir(self):
"unique sdk dir" : False,
})
work_tree = os.path.join(self.tmp, "work_tree")
- toc = qibuild.toc.Toc(work_tree=work_tree)
- self.run_wizard(toc=toc)
- build_dir = toc.config.local.build.build_dir
- sdk_dir = toc.config.local.build.sdk_dir
+ new_toc = qibuild.toc.toc_open(self.tmp)
+ self.run_wizard(toc=new_toc)
+ build_dir = new_toc.config.local.build.build_dir
+ sdk_dir = new_toc.config.local.build.sdk_dir
self.assertFalse(build_dir,
"build_dir is '%s', should be None or empty" % build_dir)
self.assertFalse(sdk_dir,
View
14 python/qibuild/test/test_toc.py
@@ -63,7 +63,13 @@ def test_custom_sdk_dir(self):
qiproj_xml = os.path.join(hello_src, "qiproject.xml")
with open(qiproj_xml, "w") as fp:
fp.write('<project name="hello" />\n')
- toc = qibuild.toc.Toc(self.tmp)
+ hello_cmake = os.path.join(hello_src, "CMakeLists.txt")
+ with open(hello_cmake, "w") as fp:
+ fp.write("project(hello)\n")
+
+ worktree = qibuild.worktree.open_worktree(self.tmp)
+ worktree.add_project("hello", hello_src)
+ toc = qibuild.toc.toc_open(self.tmp)
hello_proj = toc.get_project("hello")
sdk_dirs= dict()
@@ -73,7 +79,11 @@ def test_custom_sdk_dir(self):
custom_cmake = os.path.join(dot_qi, config + ".cmake")
with open(custom_cmake, "w") as fp:
fp.write("# Custom %s cmake config\n" % config)
- toc = qibuild.toc.Toc(self.tmp, config=config)
+ class FakeArgs:
+ pass
+ args = FakeArgs()
+ args.config = config
+ toc = qibuild.toc.toc_open(self.tmp, args=args)
sdk_dirs[config] = toc.get_project("hello").sdk_directory
a_sdk_dir = sdk_dirs["a"]
Please sign in to comment.
Something went wrong with that request. Please try again.