Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix most tests, only 8 failures now

  • Loading branch information...
commit ba9f0ae4e71c653c9d0eb00ce87081efbdfd567f 1 parent b8258e0
@mildred mildred authored
View
4 bin/clean.do
@@ -0,0 +1,4 @@
+eval $(../redoconf/sh-init)
+
+rc_clean
+
View
10 bin/xreq.dbg.do
@@ -0,0 +1,10 @@
+eval $(../redoconf/sh-init)
+
+redo-always
+
+rc_source ../config
+GPRBUILD_FLAGS+="-Xmode=debug"
+
+compile_gpr ../xreq.gpr
+mv xreq.dbg "$3"
+
View
8 clean.do
@@ -25,15 +25,8 @@ gprclean -q -Pxreqlib.gpr -Xtype=static -Xmode=coverage
rm -rf tmp
rm -rf obj/*/*
rm -rf lib/*/*
-rm bin/*
rm README.html
rm src/README.html
-rm reports/*.aunit.xml
-rm reports/gnatcheck*.out
-rm reports/gnatcheck*.log
-rm reports/*.gcov
-rm reports/features*.html
-rm reports/features*.junit/*
rm features/data/tmp-*
rm features/data/step_definitions*/*.[od]
rm features/data/step_definitions*/*.gcda
@@ -45,4 +38,5 @@ find . -name "*~" -print0 | xargs -0 rm
) 2>/dev/null >&2
+rc_clean_children
View
19 config.do
@@ -6,6 +6,25 @@ cat <<"EOF"
eval $("$TOPDIR/redoconf/sh-init")
+# dynamic makes gcov unhappy: hidden symbol `__gcov_merge_add' is referenced by
+# DSO (Dynamic Shared Object).
+LIBTYPE=static
+
+GPRBUILD_FLAGS="-p -Xtype=$LIBTYPE"
+XREQ_FLAGS=
+
+if [ -z "$VERBOSE" ]; then
+ GPRBUILD_FLAGS+=-q
+ XREQ_FLAGS=-q
+elif [ "$VERBOSE" -gt 0 ]; then
+ GPRBUILD_FLAGS+="-v"
+fi
+
+compile_gpr(){
+ redo-ifchange "$1"
+ gprbuild -P"$1" >&2
+}
+
compile_md(){
redo-ifchange "$TOPDIR/tools/Markdown.pl"
"$TOPDIR/tools/Markdown.pl" < "$1"
View
4 features/lang-ada-fill-in-steps.feature
@@ -245,6 +245,8 @@ Feature: Auto fill in of steps definitions
When I type on my keyboard "toto"
Then I should see "toto"
+ features/tests/suite features/test.feature:3
+
1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
@@ -354,6 +356,8 @@ Feature: Auto fill in of steps definitions
When I type on my keyboard "toto"
Then I should see "toto"
+ features/tests/suite features/test.feature:3
+
1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
View
10 features/process-background-error.feature
@@ -95,6 +95,8 @@ Feature: Skip scenarios after a background error
Given this step works with STEP
And this is ignored
+ ./always_fail_suite
+
4 scenarios (4 failed)
20 steps (1 failed, 18 skipped, 1 passed)
@@ -133,6 +135,8 @@ Feature: Skip scenarios after a background error
Given this step works with STEP
And this is ignored
+ ./always_fail_suite
+
4 scenarios (4 failed)
20 steps (1 failed, 18 skipped, 1 passed)
@@ -184,6 +188,9 @@ Feature: Skip scenarios after a background error
And this step works with STEP
And this is ignored
+ ./periodic_fail_suite features/data/tmp-periodic_fail.feature:12
+ ./periodic_fail_suite features/data/tmp-periodic_fail.feature:20
+
4 scenarios (2 failed, 2 passed)
20 steps (2 failed, 6 skipped, 12 passed)
@@ -238,6 +245,9 @@ Feature: Skip scenarios after a background error
And this step works with STEP
And this is ignored
+ ./periodic_fail_suite features/data/tmp-periodic_fail.feature:12
+ ./periodic_fail_suite features/data/tmp-periodic_fail.feature:20
+
4 scenarios (2 failed, 2 passed)
20 steps (2 failed, 6 skipped, 12 passed)
View
2  features/process-failed-step.feature
@@ -43,6 +43,8 @@ Feature: Error handling in steps
Scenario: Run a good step
Given this step works
+ ./suite features/data/tmp-simple_error.feature:6
+
2 scenarios (1 failed, 1 passed)
5 steps (1 failed, 1 skipped, 3 passed)
View
6 features/step_definitions/steps.rb
@@ -55,7 +55,7 @@
end
When /^I run xreq (.*)$/ do |args|
- cmd = "xreq " + args + " 2>&1";
+ cmd = "xreq.dbg " + args + " 2>&1";
#puts cmd;
#puts FileUtils.pwd();
@last_command_output = `#{cmd}`;
@@ -91,12 +91,12 @@
end
When /^I run the test suite "([^"]*)" in (.*)$/ do |command, dir|
- When("I run \"#{command} --no-color\" in #{dir}")
+ When("I run \"#{command} --no-color --no-stacktrace\" in #{dir}")
@last_command_output.sub!(/Finished in ([0-9]*m )?[0-9]*s\n$/, "");
end
When /^I run the test suite "([^"]*)"$/ do |command|
- When("I run \"#{command} --no-color\"")
+ When("I run \"#{command} --no-color --no-stacktrace\"")
@last_command_output.sub!(/Finished in ([0-9]+m )?[0-9]+s\n$/, "");
end
View
2  features/suite-debug-mode.feature
@@ -47,6 +47,8 @@ Feature: debug mode for test suites
-------------------------------------------------------------------------
Debug text for working step BAR
+ features/data/tests/suite features/data/tmp-debug-mode.feature:3
+
2 scenarios (1 failed, 1 passed)
5 steps (1 failed, 1 skipped, 3 passed)
View
14 features/suite-list-scenarios.feature
@@ -59,14 +59,14 @@ Feature: List all scenarios compiled in a test suite
"""
Feature: A
- features/data/tmp-a.feature:1 S1
- features/data/tmp-a.feature:2 S2
- features/data/tmp-a.feature:3 S3
+ features/data/tmp-a.feature#1:10 S1
+ features/data/tmp-a.feature#2:13 S2
+ features/data/tmp-a.feature#3:16 S3
Feature: B
- features/data/tmp-b.feature:1 S1
- features/data/tmp-b.feature:2 S2
- features/data/tmp-b.feature:3 S3
+ features/data/tmp-b.feature#1:10 S1
+ features/data/tmp-b.feature#2:13 S2
+ features/data/tmp-b.feature#3:16 S3
- """
+ """
View
4 features/suite-run-tags.feature
@@ -39,6 +39,8 @@ Feature: Tags
@tag2
Scenario: S
Given this step works
+
+ ./suite
1 scenario (1 failed)
2 steps (1 failed, 1 skipped)
@@ -149,6 +151,8 @@ Feature: Tags
@tag2
Scenario: S
Given this step works
+
+ ./suite
1 scenario (1 failed)
2 steps (1 failed, 1 skipped)
View
11 reports/clean.do
@@ -0,0 +1,11 @@
+eval $(../redoconf/sh-init)
+
+rm *.aunit.xml
+rm gnatcheck*.out
+rm gnatcheck*.log
+rm *.gcov
+rm features*.html
+rm features*.junit/*
+
+rc_clean
+
View
10 src/lib/dynamic/xreqlib-error_handling.adb
@@ -22,9 +22,15 @@ with GNAT.Traceback.Symbolic;
package body XReqLib.Error_Handling is
function Exception_To_String (E : Exception_Occurrence) return String is
+ Basic_Information : constant String
+ := Exception_Name (E) & ": " & Exception_Message (E) & ASCII.LF;
begin
- return Exception_Name (E) & ": " & Exception_Message (E) & ASCII.LF &
- ASCII.LF & "Stack Trace:" & ASCII.LF & Symbolic_Traceback (E);
+ if Show_Traces then
+ return Basic_Information & ASCII.LF
+ & "Stack Trace:" & ASCII.LF & Symbolic_Traceback (E);
+ else
+ return Basic_Information;
+ end if;
end Exception_To_String;
function Symbolic_Traceback (E : Exception_Occurrence) return String is
View
10 src/lib/static/xreqlib-error_handling.adb
@@ -22,9 +22,15 @@ with GNAT.Traceback.Symbolic;
package body XReqLib.Error_Handling is
function Exception_To_String (E : Exception_Occurrence) return String is
+ Basic_Information : constant String
+ := Exception_Name (E) & ": " & Exception_Message (E) & ASCII.LF;
begin
- return Exception_Name (E) & ": " & Exception_Message (E) & ASCII.LF &
- ASCII.LF & "Stack Trace:" & ASCII.LF & Symbolic_Traceback (E);
+ if Show_Traces then
+ return Basic_Information & ASCII.LF
+ & "Stack Trace:" & ASCII.LF & Symbolic_Traceback (E);
+ else
+ return Basic_Information;
+ end if;
end Exception_To_String;
function Symbolic_Traceback (E : Exception_Occurrence) return String is
View
11 src/lib/xreqlib-cli.adb
@@ -24,6 +24,7 @@ with GNAT.OS_Lib;
with GNAT.Command_Line;
with XReqLib.Format.Text;
with XReqLib.ANSI;
+with XReqLib.Error_Handling;
use Ada.Exceptions;
use Ada.Strings.Unbounded;
@@ -77,6 +78,9 @@ package body XReqLib.CLI is
Put_Line (" --no-color");
Put_Line (" Don't show colors on terminal output");
Put_Line ("");
+ Put_Line (" --no-stacktrace");
+ Put_Line (" Don't show stack traces on terminal output");
+ Put_Line ("");
-- ---------------------------------------------------------------------------XXX
-- 0 10 20 30 40 50 60 70
@@ -104,8 +108,8 @@ package body XReqLib.CLI is
is
use String_Vectors;
Parser : Opt_Parser;
- Options : constant String := "help h -help f: -format= o: -output= " &
- "-debug d -tags= t: -list -no-color";
+ Options : constant String := "help h -help f: -format= o: -output= "
+ & "-debug d -tags= t: -list -no-color -no-stacktrace";
Output : Unbounded_String := Null_Unbounded_String;
Arg : Unbounded_String;
Debug_Mode : Boolean := False;
@@ -162,6 +166,9 @@ package body XReqLib.CLI is
elsif Full_Switch (Parser) = "-no-color" then
XReqLib.ANSI.Use_ANSI_Sequences := False;
+ elsif Full_Switch (Parser) = "-no-stacktrace" then
+ XReqLib.Error_Handling.Show_Traces := False;
+
else -- Never happen unless a bug in Getopt -- GCOV_IGNORE
raise Invalid_Switch; -- GCOV_IGNORE
View
2  src/lib/xreqlib-error_handling.ads
@@ -23,6 +23,8 @@ use Ada.Exceptions;
package XReqLib.Error_Handling is
+ Show_Traces : Boolean := True;
+
function Exception_To_String (E : Exception_Occurrence) return String;
function Symbolic_Traceback (E : Exception_Occurrence) return String;
View
2  src/xreq-generator-ada05.adb
@@ -508,7 +508,7 @@ package body XReq.Generator.Ada05 is
S.Adb.Put_Line ("Fail := Stop;");
end if;
S.Adb.Put_Line ("Format.Start_Scenario;");
- S.Adb.Put_Line ("Call_Hook (Hook_StartH, Hook_Scenario);");
+ S.Adb.Put_Line ("Call_Hook (Hook_Begin, Hook_Scenario);");
S.Adb.Put_Line ("declare");
S.Adb.Indent;
S.Adb.Put_Line ("procedure Priv_Put_Scenario;");
View
12 test.do
@@ -0,0 +1,12 @@
+eval $(redoconf/sh-init)
+
+redo bin/xreq.dbg
+make lib >&2
+
+export XREQ_LANG=Ada
+echo $XREQ_LANG > .cucumber-rerun-lang.txt
+cucumber \
+ -t "~@wip" -t "~@bootstrap" -t "@lang-$XREQ_LANG,~@lang" \
+ -f progress \
+ -f rerun -o .cucumber-rerun.txt \
+ features/*.feature >&2
Please sign in to comment.
Something went wrong with that request. Please try again.