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

Added F Sharp Testing #1125

Merged
merged 4 commits into from
Sep 11, 2019
Merged

Added F Sharp Testing #1125

merged 4 commits into from
Sep 11, 2019

Conversation

auroq
Copy link
Contributor

@auroq auroq commented Sep 5, 2019

Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder! For simplicity, please make sure that your pull request includes one and only one contribution.

Complete the Applicable Sections Below

Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.

Code Snippets

  • I named the pull request using Added/Updated <Sample Program> in <Language> format
  • I created/updated the language README
    • I added the sample program name to the README
    • I added fun facts (i.e. debut, developer, typing, etc.)
    • I added reference link(s) to the README
    • I added solution citations when necessary (see plagiarism)

Documentation

  • I named the pull request using Added/Updated <Sample Program> in <Language> Article format
  • I followed the applicable article template

Testing

  • I names the pull request using Added/Updated <Language>/<Project> Testing format
  • I followed the testinfo template, if applicable

Notes

Feel free to describe what you added or updated.

@auroq auroq added enhancement Any code that improves the repo tests Testing related labels Sep 5, 2019
@auroq auroq added this to the 25 Language Tests milestone Sep 5, 2019
@auroq auroq requested a review from jrg94 September 5, 2019 15:57
@auroq
Copy link
Contributor Author

auroq commented Sep 5, 2019

Hmm... It worked on my machine. haha. I'll take a look.

@jrg94
Copy link
Member

jrg94 commented Sep 5, 2019

Long time no see!

@auroq
Copy link
Contributor Author

auroq commented Sep 5, 2019

I am not able to replicate this error on any machines I have tried. @jrg94, would you be able to try running this on your local machine?

@jrg94
Copy link
Member

jrg94 commented Sep 5, 2019

Looks like it's still failing. I was having a similar issue with Groovy, and I'm not sure how to fix it.

That said, I haven't tried setting up docker on my machine in awhile (had some trouble with that in the past). I can try to give it a go tonight tho!

@jrg94
Copy link
Member

jrg94 commented Sep 5, 2019

Doing some research on this error. Not sure what you tried, but here are some related links:

@jrg94
Copy link
Member

jrg94 commented Sep 5, 2019

Actually, I had a different issue with Groovy:

def test_hello_world(hello_world):
        actual = hello_world.run()
>       assert actual.strip() == 'Hello, World!'
E       AssertionError: assert 'Caught: java.../hello-world)' == 'Hello, World!'
E         + Hello, World!
E         - Caught: java.io.FileNotFoundException: /tmp/hsperfdata_groovy/hello-world (/tmp/hsperfdata_groovy/hello-world)
E         - java.io.FileNotFoundException: /tmp/hsperfdata_groovy/hello-world (/tmp/hsperfdata_groovy/hello-world)

@jrg94
Copy link
Member

jrg94 commented Sep 5, 2019

Gonna copy the error here for reference:

=================================== FAILURES ===================================
_______________________ test_hello_world[HelloWorld.fs] ________________________
hello_world = Source(name: HelloWorld, path: /home/travis/build/TheRenegadeCoder/sample-programs/archive/f/f-sharp
    def test_hello_world(hello_world):
        actual = hello_world.run()
>       assert actual.strip() == 'Hello, World!'
E       assert 'OCI runtime ...ror": unknown' == 'Hello, World!'
E         - OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec format error": unknown
E         + Hello, World!
test/projects/test_hello_world.py:18: AssertionError
================== 1 failed, 578 passed in 234.59s (0:03:54) ===================
The command "python -um samplerunner test" exited with 1.

@jrg94
Copy link
Member

jrg94 commented Sep 5, 2019

FYI: Docker Desktop requires Windows Pro or Enterprise which I apparently don't have. I may virtualbox it with Ubuntu...

@auroq
Copy link
Contributor Author

auroq commented Sep 6, 2019

Hmm... I just got it to run on my surface and it is failing on windows. Maybe that will give me some insight.

@auroq
Copy link
Contributor Author

auroq commented Sep 10, 2019

@jrg94 I got this to work by executing the compiled file using mono. It is ready to merge.

When using fsharpc to build in a linux docker container on a linux host, a binary is created that can just be executed. However, building in a linux docker container on a windows host, the binary cannot be executed. 🤷‍♂️

Running the binary with mono solves the problem.

While debugging this, I also came across another unrelated issue and created an issue for it: #1126

@jrg94
Copy link
Member

jrg94 commented Sep 11, 2019

Interesting! Glad you were able to isolate the issue. I'm curious how the whole Windows issue ties in with the Travis CI issue (since it's Ubuntu). At any rate, it looks like everything works now, so I'm not too worried about it. 💯

@jrg94 jrg94 merged commit 6f34efe into master Sep 11, 2019
@jrg94 jrg94 deleted the fsharp-testinfo branch September 11, 2019 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any code that improves the repo tests Testing related
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add F Sharp Testing
2 participants