5 from __future__
import print_function
11 from optparse
import OptionParser
17 self.assertTrue(os.path.isfile(DOMAIN))
19 self.assertTrue(os.path.isfile(PROBLEM))
21 config =
"ipc seq-sat-fd-autotune-1" 22 self.assertIsInstance(PLAN, str)
24 cmd =
"rosrun downward plan %s %s %s --plan-file %s" % (domain,
28 print(
"EXECUTING: ", cmd, file=sys.stderr)
31 output = subprocess.check_output(cmd, shell=
True)
32 except subprocess.CalledProcessError
as e:
34 print(
"DOWNWARD STATUS: %d, OUTPUT: %s" % (status, output), file=sys.stderr)
35 self.assertEqual(status, 0)
37 plan_real_path = plan_path +
".1" 38 self.assertTrue(os.path.isfile(plan_real_path))
40 with open(REF)
as f_ref:
41 ref_lines = f_ref.readlines()
42 with open(plan_real_path)
as f_plan:
43 plan_lines = f_plan.readlines()
44 self.assertSequenceEqual(ref_lines, plan_lines)
46 if __name__ ==
'__main__':
47 ARGV = rospy.myargv(argv=sys.argv)
53 rostest.rosrun(
"downward",
"test_downward", TestDownward)