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

Run MicroPython e2e tests #85

Open
krzema12 opened this issue Nov 30, 2021 · 1 comment
Open

Run MicroPython e2e tests #85

krzema12 opened this issue Nov 30, 2021 · 1 comment

Comments

@krzema12
Copy link
Owner

With no changes, I get this:

Traceback (most recent call last):
  File "python/e2e-tests/out/python-consumer.py", line 5, in <module>
OSError: [Errno 13] EACCES

When not writing to file, only one test fails, and the rest produces something that is expected:

$ JDK_9="$JAVA_HOME" python/e2e-tests/run.sh
Starting end-to-end tests
===== Executing 'constructors' =====
  Compiling to Python...
python/e2e-tests/out/kotlin-code.kt:3:26: warning: parameter 'a' is never used
class MultiConstructors1(a: Int) {
                         ^
python/e2e-tests/out/kotlin-code.kt:9:17: warning: parameter 'b' is never used
    constructor(b: String) : this(2) {
                ^
python/e2e-tests/out/kotlin-code.kt:24:17: warning: parameter 'a' is never used
    constructor(a: Int) {
                ^
python/e2e-tests/out/kotlin-code.kt:28:17: warning: parameter 'b' is never used
    constructor(b: String) {
                ^
python/e2e-tests/out/kotlin-code.kt:43:17: warning: parameter 'a' is never used
    constructor(a: Int) {
                ^
python/e2e-tests/out/kotlin-code.kt:47:17: warning: parameter 'b' is never used
    constructor(b: String) : this(3) {
                ^
python/e2e-tests/out/kotlin-code.kt:51:17: warning: parameter 'b' is never used
    constructor(b: Boolean) : this("c") {
                ^
python/e2e-tests/out/kotlin-code.kt:70:17: warning: parameter 'i' is never used
    constructor(i: Int) {
                ^
python/e2e-tests/out/kotlin-code.kt:77:17: warning: parameter 'a' is never used
    constructor(a: Int) : super(4) {
                ^
  Running Python to produce the output...
body 11
Traceback (most recent call last):
  File "python/e2e-tests/out/python-consumer.py", line 6, in <module>
  File "/home/piotr/repos/priv/kotlin-python/python/e2e-tests/out/compiled.py", line 13692, in multi12
  File "/home/piotr/repos/priv/kotlin-python/python/e2e-tests/out/compiled.py", line 13670, in MultiConstructors1_init__Create_
AttributeError: type object 'MultiConstructors1' has no attribute '__new__'
===== Finished with 'constructors' =====
===== Executing 'integers' =====
  Compiling to Python...
  Running Python to produce the output...
True
False
120
4
-11
===== Finished with 'integers' =====
===== Executing 'lambdas' =====
  Compiling to Python...
  Running Python to produce the output...
40
20
21
143
===== Finished with 'lambdas' =====
===== Executing '_simple' =====
  Compiling to Python...
  Running Python to produce the output...
4
===== Finished with '_simple' =====
===== Executing 'stdlib' =====
  Compiling to Python...
  Running Python to produce the output...
123
===== Finished with 'stdlib' =====
All done

@krzema12
Copy link
Owner Author

-    python3 python/e2e-tests/out/python-consumer.py > python/e2e-tests/out/output.txt
+    micropython python/e2e-tests/out/python-consumer.py | tee python/e2e-tests/out/output.txt

Using tee seems to solve the OSError: [Errno 13] EACCES issue.

@krzema12 krzema12 added this to the MicroPython support milestone Nov 30, 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

1 participant