From 78be8e1604f183b28527159047bab69a5cbe9232 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 14 Jan 2019 22:00:36 +0300 Subject: Add b_info() that runs `b info` command and parses and returns build2 project info --- tests/b-info/testscript | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 tests/b-info/testscript (limited to 'tests/b-info/testscript') diff --git a/tests/b-info/testscript b/tests/b-info/testscript new file mode 100644 index 0000000..9d1cfeb --- /dev/null +++ b/tests/b-info/testscript @@ -0,0 +1,83 @@ +# file : tests/b-info/testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Note that when cross-testing we unlikely be able to run build2 on the +# target platform. +# ++if ($test.target != $build.host) + exit +end + +sp = ' ' +test.options += -b $recall($build.path) + +: basic +: +{ + mkdir -p prj/build; + + cat <=prj/build/bootstrap.build; + project = prj + + using version + using config + using dist + EOI + + cat <=prj/buildfile; + ./: subprj/ + EOI + + cat <=prj/manifest; + : 1 + name: prj + version: 1.2.3-a.0.z + summary: test project + license: MIT + EOI + + mkdir -p prj/subprj/build; + + cat <=prj/subprj/build/bootstrap.build; + project = + + using config + using dist + EOI + + touch prj/subprj/buildfile; + + $* prj >>/~"%EOO%"; + project: prj + version: 1.2.3-a.0.z + summary: test project + url:$sp + %src_root: .+/prj/% + %out_root: .+/prj/% + amalgamation: ../../../../ + subprojects: @subprj/ + operations: update clean + meta-operations: perform configure disfigure dist info + EOO + + $* prj/subprj >>/~"%EOO%" + project:$sp + version:$sp + summary:$sp + url:$sp + %src_root: .+/subprj/% + %out_root: .+/subprj/% + amalgamation: ../ + subprojects:$sp + operations: update clean + meta-operations: perform configure disfigure dist info + EOO +} + +: error +: +$* prj 2>>/~%EOE% != 0 + %error: .+% + % info: .+%? + EOE -- cgit v1.1