Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Fix order of #pragma repy file name and args #75

@aaaaalbert

Description

@aaaaalbert

#64 noted that this test would PASS although it shouldn't:

#pragma repy restrictions.default additionalarg
# --- Note the trailing additional arg above! ---
#pragma out
raise RepyException()

while this one FAILed correctly:

#pragma repy restrictions.default
#pragma out
raise RepyException()

Inspecting the command that utf.py prepares to run the problematic test case exhibits that the additionalarg gets spliced in at the wrong place:
['/usr/local/opt/python/bin/python2.7', 'repy.py', 'restrictions.default', 'additionalarg', 'ut_problematic_test.r2py']

Thus, the sandbox is instructed to start additionalarg as the program, not the test case! This doesn't exist, so repy.py just prints FATAL ERROR: Unable to read the specified program file: 'additionalarg' to stdout, and exits. Since this example test case specifies #pragma out, Repy's error message isn't considered a FAIL.

The fix obviously is to order the args to the sandbox so that the program name goes first, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions