Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several tests are failing #144

Closed
mingodad opened this issue Dec 14, 2021 · 3 comments
Closed

Several tests are failing #144

mingodad opened this issue Dec 14, 2021 · 3 comments

Comments

@mingodad
Copy link
Contributor

Describe the bug
When building with make check several tests fail

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build; cmake -DENABLE_CHECK=On ..; make check
  2. See the errors

Obs: I've added two print on check_spec.y:

            if 'grammar' in spec:
                cmd.extend(['--grammar-str', spec['grammar']])
            elif 'grammar_file' in spec:
                if spec['grammar_file'].startswith('/'):
                    cmd.extend(['--grammar-file', spec['grammar_file']])
                else:
                    cmd.extend(['--grammar-file', os.path.dirname(os.path.abspath(specs_file)) + '/' + spec['grammar_file']])
            else:
                raise ValueError('Missing grammar/grammar_file')
            print(cmd) #<<<< here
            print(test['I'].encode('utf-8')) #<<<< here
            proc = subprocess.run(
                cmd,
                capture_output=True,
                input=test['I'].encode('utf-8'),
            )
make check
[  3%] Built target unity
[  6%] Built target peppa
[ 11%] Built target test_flags
[ 15%] Built target cli
[ 20%] Built target test_example_dot
[ 25%] Built target test_example_calc
[ 30%] Built target test_example_json
[ 35%] Built target test_peg
[ 40%] Built target test_positive
[ 45%] Built target test_literal
[ 50%] Built target test_range
[ 55%] Built target test_misc
[ 60%] Built target test_cut
[ 65%] Built target test_sequence
[ 70%] Built target test_choice
[ 75%] Built target test_reference
[ 80%] Built target test_negative
[ 85%] Built target test_example_mustache
[ 90%] Built target test_repeat
[ 95%] Built target test_left_recursion
[100%] Built target test_back_reference
Test project PeppaPEG/build/tests
      Start  1: test_literal
 1/48 Test  #1: test_literal .....................   Passed    0.00 sec
      Start  2: test_range
 2/48 Test  #2: test_range .......................   Passed    0.00 sec
      Start  3: test_sequence
 3/48 Test  #3: test_sequence ....................   Passed    0.00 sec
      Start  4: test_choice
 4/48 Test  #4: test_choice ......................   Passed    0.00 sec
      Start  5: test_reference
 5/48 Test  #5: test_reference ...................   Passed    0.00 sec
      Start  6: test_positive
 6/48 Test  #6: test_positive ....................   Passed    0.00 sec
      Start  7: test_negative
 7/48 Test  #7: test_negative ....................   Passed    0.00 sec
      Start  8: test_repeat
 8/48 Test  #8: test_repeat ......................   Passed    0.00 sec
      Start  9: test_flags
 9/48 Test  #9: test_flags .......................   Passed    0.00 sec
      Start 10: test_cut
10/48 Test #10: test_cut .........................   Passed    0.00 sec
      Start 11: test_back_reference
11/48 Test #11: test_back_reference ..............   Passed    0.00 sec
      Start 12: test_left_recursion
12/48 Test #12: test_left_recursion ..............   Passed    0.00 sec
      Start 13: test_misc
13/48 Test #13: test_misc ........................   Passed    0.00 sec
      Start 14: test_peg
14/48 Test #14: test_peg .........................   Passed    0.01 sec
      Start 15: test_example_mustache
15/48 Test #15: test_example_mustache ............   Passed    0.00 sec
      Start 16: test_example_json
16/48 Test #16: test_example_json ................   Passed    0.02 sec
      Start 17: test_example_calc
17/48 Test #17: test_example_calc ................   Passed    0.01 sec
      Start 18: test_example_dot
18/48 Test #18: test_example_dot .................   Passed    0.08 sec
      Start 19: test_literal_spec.json
19/48 Test #19: test_literal_spec.json ...........***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = "1";']
b'1'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 20: test_range_spec.json
20/48 Test #20: test_range_spec.json .............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'Num', '--grammar-str', 'Num = [1-9];']
b'1'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 21: test_insensitive_spec.json
21/48 Test #21: test_insensitive_spec.json .......***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = i"1";']
b'1'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 22: test_sequence_spec.json
22/48 Test #22: test_sequence_spec.json ..........***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = "a" "b" "c";']
b'abc'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 23: test_choice_spec.json
23/48 Test #23: test_choice_spec.json ............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = "a" / "b" / "c";']
b'a'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 24: test_left_recursion_spec.json
24/48 Test #24: test_left_recursion_spec.json ....***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'A', '--grammar-str', 'A = "a" | B "a"; B = "b";']
b'a'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 25: test_lookahead_spec.json
25/48 Test #25: test_lookahead_spec.json .........***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = !"a" [a-f];']
b'b'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 26: test_cut_spec.json
26/48 Test #26: test_cut_spec.json ...............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = R2*;R2 = "1" ~ "2";']
b'121'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 27: test_repeat_spec.json
27/48 Test #27: test_repeat_spec.json ............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = ([0-9] / [a-f] / [A-F])+;']
b'1A9F'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 28: test_reference_spec.json
28/48 Test #28: test_reference_spec.json .........***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = R2; R2 = "1";']
b'1'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 29: test_back_reference_spec.yaml
29/48 Test #29: test_back_reference_spec.yaml ....***Failed    0.12 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = R23 \\0;\nR23 = "2" / "3";\n']
b'22'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 30: test_dot_spec.json
30/48 Test #30: test_dot_spec.json ...............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = .;']
b'\xe5\xa5\xbd'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 31: test_comment_spec.json
31/48 Test #31: test_comment_spec.json ...........***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', 'R1 = "1"# R1 = "3";\n;']
b'1'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 32: test_flags_spec.json
32/48 Test #32: test_flags_spec.json .............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'R1', '--grammar-str', '@squashed\nR1 = R2 R2;R2 = "X";']
b'XX'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 33: test_peppa_spec.json
33/48 Test #33: test_peppa_spec.json .............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'number', '--grammar-file', 'PeppaPEG/tests/./peppa.peg']
b'0'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 34: test_golang_v1_17_spec.json
34/48 Test #34: test_golang_v1_17_spec.json ......***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'Literal', '--grammar-file', 'PeppaPEG/tests/../configs/golang-v1.17.peg']
b'42'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 35: toml/test_array.yaml
35/48 Test #35: toml/test_array.yaml .............***Failed    0.22 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'ints = [1, 2, 3, ]\nfloats = [1.1, 2.1, 3.1]\nstrings = ["a", "b", "c"]\ndates = [\n  1987-07-05T17:45:00Z,\n  1979-05-27T07:32:00Z,\n  2006-06-01T11:00:00Z,\n]\ncomments = [\n         1,\n         2, #this is ok\n]\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 36: toml/test_bool.yaml
36/48 Test #36: toml/test_bool.yaml ..............***Failed    0.11 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b't = true\nf = false\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 37: toml/test_comment.yaml
37/48 Test #37: toml/test_comment.yaml ...........***Failed    0.16 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'# This is a full-line comment\nkey = "value" # This is a comment at the end of a line\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 38: toml/test_control.yaml
38/48 Test #38: toml/test_control.yaml ...........***Failed    0.12 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'comment-lf = "ctrl-P" # \x10\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 39: toml/test_datetime.yaml
39/48 Test #39: toml/test_datetime.yaml ..........***Failed    0.21 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'space = 1987-07-05 17:45:00Z\nlower = 1987-07-05t17:45:00z\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 40: toml/test_float.yaml
40/48 Test #40: toml/test_float.yaml .............***Failed    0.17 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'double-point-1 = 0..1\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 41: toml/test_inline_table.yaml
41/48 Test #41: toml/test_inline_table.yaml ......***Failed    0.33 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'people = [{first_name = "Bruce", last_name = "Springsteen"},\n          {first_name = "Eric", last_name = "Clapton"},\n          {first_name = "Bob", last_name = "Seger"}]\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 42: toml/test_integer.yaml
42/48 Test #42: toml/test_integer.yaml ...........***Failed    0.17 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'capital-bin = 0B0\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 43: toml/test_key.yaml
43/48 Test #43: toml/test_key.yaml ...............***Failed    0.27 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'[[agencies]] owner = "S Cjelli"\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 44: toml/test_string.yaml
44/48 Test #44: toml/test_string.yaml ............***Failed    0.24 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'naughty = "\\xAg"\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 45: toml/test_table.yaml
45/48 Test #45: toml/test_table.yaml .............***Failed    0.24 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'toml', '--grammar-file', 'PeppaPEG/tests/toml/../../configs/toml-v1.0.peg']
b'[[]]\nname = "Born to Run"\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 46: abnf/test_rfc5234.yaml
46/48 Test #46: abnf/test_rfc5234.yaml ...........***Failed    0.24 sec
['PeppaPEG/build/cli', 'parse', '--grammar-entry', 'RuleList', '--grammar-file', 'PeppaPEG/tests/abnf/../../configs/abnf.peg']
b'rulelist       =  1*( rule / (*c-wsp c-nl) )\n\nrule           =  rulename defined-as elements c-nl\n                ; continues if next line starts\n                ;  with white space\n\nrulename       =  ALPHA *(ALPHA / DIGIT / "-")\n\ndefined-as     =  *c-wsp ("=" / "=/") *c-wsp\n                                ; basic rules definition and\n                                ;  incremental alternatives\n\nelements       =  alternation *c-wsp\n\nc-wsp          =  WSP / (c-nl WSP)\n\nc-nl           =  comment / CRLF\n                    ; comment or newline\n\ncomment        =  ";" *(WSP / VCHAR) CRLF\n\nalternation    =  concatenation\n                *(*c-wsp "/" *c-wsp concatenation)\n\nconcatenation  =  repetition *(1*c-wsp repetition)\n\nrepetition     =  [repeat] element\n\nrepeat         =  1*DIGIT / (*DIGIT "*" *DIGIT)\n\nelement        =  rulename / group / option /\n                char-val / num-val / prose-val\n\ngroup          =  "(" *c-wsp alternation *c-wsp ")"\n\noption         =  "[" *c-wsp alternation *c-wsp "]"\n\nchar-val       =  DQUOTE *(%x20-21 / %x23-7E) DQUOTE\n                    ; quoted string of SP and VCHAR\n                    ;  without DQUOTE\n\nnum-val        =  "%" (bin-val / dec-val / hex-val)\n\nbin-val        =  "b" 1*BIT\n                [ 1*("." 1*BIT) / ("-" 1*BIT) ]\n                    ; series of concatenated bit values\n                    ;  or single ONEOF range\n\ndec-val        =  "d" 1*DIGIT\n                [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ]\n\nhex-val        =  "x" 1*HEXDIG\n                [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ]\n\nprose-val      =  "<" *(%x20-3D / %x3F-7E) ">"\n                    ; bracketed string of SP and VCHAR\n                    ;  without angles\n                    ; prose description, to be used as\n                    ;  last resort\n'
Traceback (most recent call last):
  File "PeppaPEG/scripts/check_spec.py", line 87, in <module>
    test_spec()
  File "PeppaPEG/scripts/check_spec.py", line 48, in test_spec
    input=test['I'].encode('utf-8'),
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

      Start 47: lua-5.4.3/*.lua
47/48 Test #47: lua-5.4.3/*.lua ..................   Passed    2.31 sec
      Start 48: abnf/*.abnf
48/48 Test #48: abnf/*.abnf ......................   Passed    0.05 sec

42% tests passed, 28 tests failed out of 48

Total Test time (real) =   6.75 sec

The following tests FAILED:
	 19 - test_literal_spec.json (Failed)
	 20 - test_range_spec.json (Failed)
	 21 - test_insensitive_spec.json (Failed)
	 22 - test_sequence_spec.json (Failed)
	 23 - test_choice_spec.json (Failed)
	 24 - test_left_recursion_spec.json (Failed)
	 25 - test_lookahead_spec.json (Failed)
	 26 - test_cut_spec.json (Failed)
	 27 - test_repeat_spec.json (Failed)
	 28 - test_reference_spec.json (Failed)
	 29 - test_back_reference_spec.yaml (Failed)
	 30 - test_dot_spec.json (Failed)
	 31 - test_comment_spec.json (Failed)
	 32 - test_flags_spec.json (Failed)
	 33 - test_peppa_spec.json (Failed)
	 34 - test_golang_v1_17_spec.json (Failed)
	 35 - toml/test_array.yaml (Failed)
	 36 - toml/test_bool.yaml (Failed)
	 37 - toml/test_comment.yaml (Failed)
	 38 - toml/test_control.yaml (Failed)
	 39 - toml/test_datetime.yaml (Failed)
	 40 - toml/test_float.yaml (Failed)
	 41 - toml/test_inline_table.yaml (Failed)
	 42 - toml/test_integer.yaml (Failed)
	 43 - toml/test_key.yaml (Failed)
	 44 - toml/test_string.yaml (Failed)
	 45 - toml/test_table.yaml (Failed)
	 46 - abnf/test_rfc5234.yaml (Failed)
Errors while running CTest
tests/CMakeFiles/check.dir/build.make:94: recipe for target 'tests/CMakeFiles/check' failed
make[3]: *** [tests/CMakeFiles/check] Error 8
CMakeFiles/Makefile2:309: recipe for target 'tests/CMakeFiles/check.dir/all' failed
make[2]: *** [tests/CMakeFiles/check.dir/all] Error 2
CMakeFiles/Makefile2:316: recipe for target 'tests/CMakeFiles/check.dir/rule' failed
make[1]: *** [tests/CMakeFiles/check.dir/rule] Error 2
Makefile:248: recipe for target 'check' failed
make: *** [check] Error 2

@soasme
Copy link
Owner

soasme commented Dec 14, 2021

capture_output is only available since Python 3.7+. https://docs.python.org/3/library/subprocess.html
It seems the Python version is 3.6 on your local.

soasme added a commit that referenced this issue Dec 14, 2021
Bugfix: Support Python3.6+ for running the test suite (#144)
@soasme
Copy link
Owner

soasme commented Dec 14, 2021

Can you please try with the HEAD of main branch? I've checked in a fix, see PR #148.

@mingodad
Copy link
Contributor Author

Thank you !
All tests pass now on my machine.

@soasme soasme closed this as completed Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants