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

Compiler "failing" even though it is returning 0 for the case #81

Closed
SunilPaul174 opened this issue Sep 23, 2024 · 6 comments
Closed

Compiler "failing" even though it is returning 0 for the case #81

SunilPaul174 opened this issue Sep 23, 2024 · 6 comments

Comments

@SunilPaul174
Copy link

SunilPaul174 commented Sep 23, 2024

I'm not sure if i have structured my driver wrong or something, but the program is failing tests even though when run individually, it is returning 0.
Screenshot_20240923_091404
The tests failed are:

test_framework.basic.TestChapter1.test_valid/multi_digit
test_framework.basic.TestChapter1.test_valid/newlines
test_framework.basic.TestChapter1.test_valid/no_newlines
test_framework.basic.TestChapter1.test_valid/return_0
test_framework.basic.TestChapter1.test_valid/return_2
test_framework.basic.TestChapter1.test_valid/spaces
test_framework.basic.TestChapter1.test_valid/tabs
@nlsandler
Copy link
Owner

Thanks for reporting this! Could you please include the whole command you're using to invoke the test script?

@SunilPaul174
Copy link
Author

SunilPaul174 commented Sep 23, 2024

./test_compiler ./compiler --chapter 1 --stage codegen
Where compiler is the rust binary i have copied target/release/<cratename> into the repository directory of these tests

@SunilPaul174
Copy link
Author

image
information about the machine, if it's necessary

@nlsandler
Copy link
Owner

Thanks!

The test script invokes your compiler with the --codegen option first, before the source file name. Does your compiler driver expect --codegen to come last? That could the issue you're seeing.

@SunilPaul174
Copy link
Author

It does, i'll try restructuring it.

@SunilPaul174
Copy link
Author

Thank you! After some unrelated bug fixes to the compiler, putting the option for the compiler before the file works!
image
I'll be closing this issue now.

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