commit a569221143626960c139b9070b6cc0076fab9458 from: Sergey Bronnikov date: Thu Aug 01 10:46:19 2019 UTC subunit yacc parser initial commit commit - c70734fe8966e035a2b2e1d7d3d543bc552b33a8 commit + a569221143626960c139b9070b6cc0076fab9458 blob - /dev/null blob + 5b39939672b6677f973c54d0f4aac79833d0e2d6 (mode 644) --- /dev/null +++ libtestoutput/parse_subunit_v1.l @@ -0,0 +1,27 @@ +%{ +#include +#include "parse_subunit_v1.tab.h" +int yylval; +%} + +%option yylineno +%option noyywrap + +%% +^(test|testing):? return TEST; +^(success|successful):? return SUCCESS; +^failure: return FAILURE; +^error: return ERROR; +^skip:? return SKIP; +^xfail:? return XFAIL; +^uxsuccess:? return UXSUCCESS; +^progress: return PROGRESS; +^tags: return TAGS; +^time: return TIME; +pop|push yylval = !strcmp(yytext, "pop"); return ACTION; +"["(.|\n)*"]" return CONTENT; +[1-9][0-9]+ yylval = atoi(yytext); return NUMBER; +[[:alnum:][:punct:]]+ return WORD; +\n return NL; +[ \t]+ /* skip whitespace */ +%% blob - /dev/null blob + 1b539ddbdec33b45a70d7aabb0ebe6007218a7a8 (mode 644) --- /dev/null +++ libtestoutput/parse_subunit_v1.y @@ -0,0 +1,130 @@ +%{ +#include +#include + +#define YYDEBUG 1 + +void yyerror(char *); +int yylex(void); +%} + +%token TEST SUCCESS FAILURE ERROR SKIP XFAIL UXSUCCESS +%token PROGRESS TAGS TIME ACTION CONTENT_TYPE MULTIPART NL +%token ZERO OPEN_BRACKET CLOSE_BRACKET CONTENT +%token WORD NUMBER + +%% +program : program testline NL + | error NL { yyerrok; } + | + ; + +testline : TEST WORD { + printf("TEST\n"); + } + | status WORD details { + printf("STATUS\n"); + } + | PROGRESS ACTION { + printf("PROGRESS\n"); + } + | PROGRESS NUMBER { + printf("PROGRESS %d\n", $2); + } + | TAGS tags { + printf("TAGS\n"); + } + | TIME WORD WORD { + printf("TIME\n"); + } + ; + +details : OPEN_BRACKET MULTIPART NL CONTENT CLOSE_BRACKET + | OPEN_BRACKET NL string NL CLOSE_BRACKET + | + ; + +string : WORD + | string WORD + | + ; + +tags : WORD + | tags WORD + ; + +status : SUCCESS + | FAILURE + | ERROR + | SKIP + | XFAIL + | UXSUCCESS + ; +%% + +#include +#include +#include + +char *progname; +extern int yylex(); +extern int yyparse(); +extern int yylineno; +extern FILE *yyin; + +struct tailq_entry { + int tc_number; + char tc_desc; + char tc_comment; + TAILQ_ENTRY(tailq_entry) entries; +}; + +TAILQ_HEAD(, tailq_entry) report_head; + +void yyerror(char *s) +{ + fprintf( stderr, "Warning: %s, line %d\n", s, yylineno); +} + +int main( int argc, char **argv ) { + + progname = argv[0]; + + if (argc > 1) + { + yyin = fopen(argv[1], "r"); + yylineno = 0; + if (!yyin) { + printf("Can't open file %s\n", argv[1]); + return -1; + } + } + + yyparse(); + +/* + struct tailq_entry *item; + struct tailq_entry *tmp_item; + int i; + + TAILQ_INIT(&report_head); + + for (i = 0; i < 10; i++) { + item = malloc(sizeof(*item)); + if (item == NULL) { + perror("malloc failed"); + exit(EXIT_FAILURE); + } + + item->tc_number = i; + TAILQ_INSERT_TAIL(&report_head, item, entries); + } + + TAILQ_FOREACH(item, &report_head, entries) { + printf("%d ", item->tc_number); + } +*/ + + /* close(yyin); */ + return 0; +} blob - /dev/null blob + 50ddb3d723da8584054eeb136ee0176439bccc1e (mode 644) --- /dev/null +++ libtestoutput/t/t0 @@ -0,0 +1,4 @@ +test: bzrlib.tests.blackbox.test_add.TestAdd.test_add_in_versioned(view-aware) +test bzrlib.tests.blackbox.test_add.TestAdd.test_add_in_versioned(view-aware) +testing: bzrlib.tests.blackbox.test_add.TestAdd.test_add_in_versioned(view-aware) +testing bzrlib.tests.blackbox.test_add.TestAdd.test_add_in_versioned(view-aware) blob - /dev/null blob + c968c12945c7cce5a4981e1b0100194e360d0647 (mode 644) --- /dev/null +++ libtestoutput/t/t1 @@ -0,0 +1,48 @@ +successful: bzrlib.doc.api.DocFileTest(/usr/lib64/python2.7/site-packages/bzrlib/doc/api/branch.txt) +successful bzrlib.doc.api.DocFileTest(/usr/lib64/python2.7/site-packages/bzrlib/doc/api/branch.txt) +success: bzrlib.doc.api.DocFileTest(/usr/lib64/python2.7/site-packages/bzrlib/doc/api/branch.txt) +success bzrlib.doc.api.DocFileTest(/usr/lib64/python2.7/site-packages/bzrlib/doc/api/branch.txt) +successful: bzrlib.tests.blackbox.test_add.TestAdd.test_add_control_dir(pre-views) [ multipart +] +successful: bzrlib.tests.blackbox.test_cat.TestCat.test_cat [ multipart +Content-Type: text/plain;charset=utf8 +start_bzr_subprocess-log-0 +1E9 + +this is a debug log for diagnosing/reporting problems in bzr +you can delete or truncate this file, or include sections in +bug reports to https://bugs.launchpad.net/bzr/+filebug + +Tue 2016-07-05 12:17:18 +0000 +0.035 bazaar version: 2.6.0 +0.035 bzr arguments: [u'--no-plugins', u'cat', u'a'] +0.039 encoding stdout as osutils.get_user_encoding() 'utf-8' +0.060 opening working tree '/tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_cat.TestCat.test_cat/work/branch' +0.064 return code 0 +0 +] +successful: bzrlib.tests.blackbox.test_debug.TestDebugBytes.test_bytes_reports_activity [ multipart +Content-Type: text/plain;charset=utf8 +start_bzr_subprocess-log-0 +7A6 + +this is a debug log for diagnosing/reporting problems in bzr +you can delete or truncate this file, or include sections in +bug reports to https://bugs.launchpad.net/bzr/+filebug + +Tue 2016-07-05 12:17:29 +0000 +0.038 bazaar version: 2.6.0 +0.038 bzr arguments: [u'--no-plugins', u'branch', u'-Dbytes', u'-Oprogress_bar=text', u'bzr://127.0.0.1:40952/extra//tree', u'target'] +0.042 encoding stdout as osutils.get_user_encoding() 'utf-8' +0.092 creating repository in file:///tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_debug.TestDebugBytes.test_bytes_reports_activity/work/target/.bzr/. +0.100 Using fetch logic to copy between RemoteRepository(bzr://127.0.0.1:40952/extra//tree/.bzr/)(RemoteRepositoryFormat(_network_name='Bazaar repository format 2a (needs bzr 1.16 or later)\n')) and CHKInventoryRepository('file:///tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_debug.TestDebugBytes.test_bytes_reports_activity/work/target/.bzr/repository/')(RepositoryFormat2a()) +0.100 fetching: +0.125 creating branch in file:///tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_debug.TestDebugBytes.test_bytes_reports_activity/work/target/ +0.137 created new branch BzrBranch7(file:///tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_debug.TestDebugBytes.test_bytes_reports_activity/work/target/) +0.143 trying to create missing lock '/tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_debug.TestDebugBytes.test_bytes_reports_activity/work/target/.bzr/checkout/dirstate' +0.144 opening working tree '/tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_debug.TestDebugBytes.test_bytes_reports_activity/work/target' +[14367] 2016-07-05 12:17:29.858 INFO: Branched 1 revision. +0.169 Transferred: 4kB (38.3kB/s r:3kB w:1kB) +0.169 return code 0 +0 +] blob - /dev/null blob + b755609d2fec4cffc6651e0711256e8cb7e38ce2 (mode 644) --- /dev/null +++ libtestoutput/t/t2 @@ -0,0 +1 @@ +failure: bzrlib.tests.per_transport.TransportTests.test_put_file_unicode(SFTPTransport,SFTPAbsoluteServer) blob - /dev/null blob + 2192aebcfe13c9464b40eafbe6abf968c197b822 (mode 644) --- /dev/null +++ libtestoutput/t/t3 @@ -0,0 +1 @@ +error: bzrlib.tests.test_config.TestListOption.test_convert_invalid blob - /dev/null blob + de94ad005e988c2462647ccd0a7658a65f3ed18f (mode 644) --- /dev/null +++ libtestoutput/t/t4 @@ -0,0 +1,11 @@ +skip: bzrlib.tests.test_config.TestListOption.test_convert_invalid +skip bzrlib.tests.test_config.TestListOption.test_convert_invalid +skip: bzrlib.tests.blackbox.test_conflicts.TestUnicodePathsOnAsciiTerminal.test_text_conflict_paths [ multipart +Content-Type: text/plain;charset=utf8 +reason +34 +Need to decide if replacing is the desired behaviour0 +] +skip: bzrlib.tests.test_http.TestBadProtocolServer.test_http_has(pycurl,HTTP/1.1) [ +pycurl doesn't check the protocol version +] blob - /dev/null blob + 6759816c5653b632a7dc532a508c8a4883757e35 (mode 644) --- /dev/null +++ libtestoutput/t/t5 @@ -0,0 +1,32 @@ +xfail: bzrlib.tests.test_config.TestListOption.test_convert_invalid +xfail bzrlib.tests.test_config.TestListOption.test_convert_invalid +xfail: bzrlib.tests.blackbox.test_branch.TestSmartServerBranching.test_branch_to_stacked_from_trivial_branch_streaming_acceptance [ multipart +Content-Type: text/plain;charset=utf8 +reason +28 +branching to stacked requires VFS access0 +Content-Type: text/x-traceback;charset=utf8,language=python +traceback +628 +Traceback (most recent call last): +testtools.matchers._impl.MismatchError: no VFS calls expected, got: get('/extra/from/.bzr/branch-format'),stat('/extra/from/.bzr'),get('/extra/from/.bzr/repository/format'),stat('/extra/from/.bzr/repository'),get('/extra/from/.bzr/repository/pack-names'),readv('/extra/from/.bzr/repository/indices/de97e2496fa3dd45b2359f2f1a626191.iix'),readv('/extra/from/.bzr/repository/indices/73e8a504afe122b1ce8268cda633f5bb.iix'),readv('/extra/from/.bzr/repository/indices/6ad3854f879988a5e3baed976f5342a8.iix'),readv('/extra/from/.bzr/repository/indices/66b0cf2139ffb950f9218ce76513d6b6.iix'),readv('/extra/from/.bzr/repository/indices/61fe9316a5297e923be85e5a6cad0c3d.iix'),readv('/extra/from/.bzr/repository/indices/5e5b018349a58a874cf866e170096caf.iix'),readv('/extra/from/.bzr/repository/indices/42b85dec38b4b4f9dcd1d6a843c917c0.iix'),readv('/extra/from/.bzr/repository/indices/3aa1b850870affa8c2e89a58b01fb5b6.iix'),readv('/extra/from/.bzr/repository/indices/1dabcc74cbb528ef836dfb7fe2379135.iix'),readv('/extra/from/.bzr/repository/packs/1dabcc74cbb528ef836dfb7fe2379135.pack'),readv('/extra/from/.bzr/repository/indices/1dabcc74cbb528ef836dfb7fe2379135.cix'),readv('/extra/from/.bzr/repository/indices/de97e2496fa3dd45b2359f2f1a626191.cix'),readv('/extra/from/.bzr/repository/packs/de97e2496fa3dd45b2359f2f1a626191.pack'),readv('/extra/from/.bzr/repository/packs/de97e2496fa3dd45b2359f2f1a626191.pack'),get('/extra/from/.bzr/branch-format'),stat('/extra/from/.bzr'),get('/extra/from/.bzr/repository/format'),stat('/extra/from/.bzr/repository') +0 +] +xfail: bzrlib.tests.blackbox.test_commit.TestCommit.test_non_ascii_file_unversioned_iso_8859_5 [ multipart +Content-Type: text/plain;charset=utf8 +reason +2A +Error messages are always written as UTF-80 +Content-Type: text/x-traceback;charset=utf8,language=python +traceback +11B +Traceback (most recent call last): +AssertionError: b'string \'\\xc2\\xa7\' found in \'\'\'Committing to: /tmp/testbzr-yZyPQl.tmp/bzrlib.tests.blackbox.test_commit.TestCommit.test_non_ascii_file_unversioned_iso_8859_5/work/\nbzr: ERROR: Path(s) are not versioned: "\xc2\xa7"\n\'\'\'' +0 +] +xfail: bzrlib.tests.test_http.TestAuth.test_changing_nonce(pycurl,HTTP/1.0,digest) [ multipart +Content-Type: text/plain;charset=utf8 +reason +25 +pycurl does not handle a nonce change0 +] blob - /dev/null blob + ef9511300148e9fcc224aee442742e1d83c25db1 (mode 644) --- /dev/null +++ libtestoutput/t/t6 @@ -0,0 +1,2 @@ +uxsuccess: bzrlib.tests.test_config.TestListOption.test_convert_invalid +uxsuccess bzrlib.tests.test_config.TestListOption.test_convert_invalid blob - /dev/null blob + 5c265870427d7b4e50419dcae1099318dde9f5e9 (mode 644) --- /dev/null +++ libtestoutput/t/t7 @@ -0,0 +1,3 @@ +progress: 28704 +progress: push +progress: pop blob - /dev/null blob + 75f10499cccae58c6b03538844682e5b6723f434 (mode 644) --- /dev/null +++ libtestoutput/t/t8 @@ -0,0 +1 @@ +tags: -hdd -cpu mem blob - /dev/null blob + 0e919434707a870cfdf104060ae6e12d4a99eee0 (mode 644) --- /dev/null +++ libtestoutput/t/t9 @@ -0,0 +1,2 @@ +time: 2016-07-05 12:35:04.869546Z +time: 2016-07-05 12:35:04.869674Z