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)
29 (status, output) = commands.getstatusoutput(cmd)
30 print(
"DOWNWARD STATUS: %d, OUTPUT: %s" % (status, output), file=sys.stderr)
31 self.assertEqual(status, 0)
33 plan_real_path = plan_path +
".1" 34 self.assertTrue(os.path.isfile(plan_real_path))
36 with open(REF)
as f_ref:
37 ref_lines = f_ref.readlines()
38 with open(plan_real_path)
as f_plan:
39 plan_lines = f_plan.readlines()
40 self.assertSequenceEqual(ref_lines, plan_lines)
42 if __name__ ==
'__main__':
43 ARGV = rospy.myargv(argv=sys.argv)
49 rostest.rosrun(
"downward",
"test_downward", TestDownward)