Hello I have problems writing tests for my code. LINUXCNC - 2.10.0~pre0 I created in my RIP dir ripdir/tests/pyvcpbar and files test.hal pbar01.xnl expected and quick tested with cd ripdir/tests/pyvcpbar halrun -I -f test.hal or halrun -f test.hal those run fine the terminal showedtomp@ThaiTowerD10:~/linuxcnc-barwidgets/tests/pyvcp-bar$ halrun -f test.hal
Note: Using POSIX realtime Note: Using POSIX realtime tomp@ThaiTowerD10: but cd ../.. to root of rip then run auto tests limited to new dirtomp@ThaiTowerD10:~/linuxcnc-barwidgets$ scripts/runtests -v tests/pyvcp-bar
Running test: tests/pyvcp-bar Traceback (most recent call last): File "/home/tomp/linuxcnc-barwidgets/bin/pyvcp", line 101, in <module> main() File "/home/tomp/linuxcnc-barwidgets/bin/pyvcp", line 83, in main pyvcp0 = Tk() File "/usr/lib/python3.7/tkinter/__init__.py", line 2023, in __init__self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable test.hal:6: waitpid failed pyvcp pbar01 test.hal:6: pyvcp exited without becoming ready Note: Using POSIX realtime *** tests/pyvcp-bar: XFAIL: test run exited with 1 Runtest: 1 tests run, 0 successful, 1 failed + 0 expected, 0 skipped Failed: tests/pyvcp-bar
Why "no display name and no $DISPLAY ?" Why an error if it ran halrun -f test.hal ? thanks tomp
Note: Using POSIX realtime Note: Using POSIX realtime
<?xml version='1.0' encoding='UTF-8'?> <pyvcp> <vbox> <hbox> <vbox> <bar> <halpin>"proc01"</halpin> <min_>100</min_> <max_>110</max_> <bgcolor>'grey'</bgcolor> <fillcolor>'red'</fillcolor> </bar> </vbox> </hbox> </vbox> </pyvcp>
result
Description: application/unknown-content-type
Traceback (most recent call last): File "/home/tomp/linuxcnc-barwidgets/bin/pyvcp", line 101, in <module> main() File "/home/tomp/linuxcnc-barwidgets/bin/pyvcp", line 83, in main pyvcp0 = Tk() File "/usr/lib/python3.7/tkinter/__init__.py", line 2023, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable test.hal:5: waitpid failed pyvcp pbar01 test.hal:5: pyvcp exited without becoming ready Note: Using POSIX realtime
# ######################################### # 19nob test file pbar01.hal # ######################################### loadusr -Wn pbar01 pyvcp -c pbar01 /home/tomp/linuxcnc-barwidgets/tests/pyvcp-bar/pbar01.xml loadrt siggen # automatically get 'servc-thread' loadrt threads name1=fast period1=50000 name2=slow period2=1000000 setp siggen.0.frequency 40 #10 OK SLOW 100 FAST JERKY 21-29 have beat freq avoid with ranges setp siggen.0.amplitude 5 setp siggen.0.offset 105 addf siggen.0.update fast net sinsig siggen.0.sine pbar01.proc01 start
_______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers