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

Implement proper unit testing #50

Open
benkohler opened this issue Jul 1, 2022 · 1 comment
Open

Implement proper unit testing #50

benkohler opened this issue Jul 1, 2022 · 1 comment

Comments

@benkohler
Copy link

I can get tests to pass on a snapshot from just before the meson conversion, but I cannot get them to pass on meson. Wondering if they pass for anyone else.

Log of Meson test suite run on 2022-07-01T10:06:08.295489

Inherited environment: SHELL=/bin/bash XDG_CONFIG_DIRS=/etc/xdg LESS='-R -M --shift 5' CONFIG_PROTECT_MASK='/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/gconf /etc/terminfo /etc/dconf /etc/ca-certificates.conf /etc/revdep-rebuild' EDITOR=/usr/bin/vi PWD=/root CONFIG_PROTECT='/usr/share/gnupg/qualified.txt /usr/lib64/libreoffice/program/sofficerc' LOGNAME=root MANPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.3.0/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.38/man:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/14/share/man XAUTHORITY=/root/.xauthDSkeeT OPENCL_PROFILE=mesa HOME=/root LANG=en_US.utf8 LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.avif=01;35:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.webp=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.cfg=00;32:.conf=00;32:.diff=00;32:.doc=00;32:.ini=00;32:.log=00;32:.patch=00;32:.pdf=00;32:.ps=00;32:.tex=00;32:.txt=00;32:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36:~=00;90:#=00;90:.bak=00;90:.old=00;90:.orig=00;90:.part=00;90:.rej=00;90:.swp=00;90:.tmp=00;90:.dpkg-dist=00;90:.dpkg-old=00;90:.ucf-dist=00;90:.ucf-new=00;90:.ucf-old=00;90:.rpmnew=00;90:.rpmorig=00;90:*.rpmsave=00;90:' FLTK_DOCDIR=/usr/share/doc/fltk-1.3.5-r4/html OPENGL_PROFILE=xorg-x11 INFOPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/11.3.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.38/info:/usr/share/info MOZ_GMP_PATH=/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed TERM=xterm-256color LESSOPEN='|lesspipe %s' USER=root MANPAGER=manpager DISPLAY=:0 SHLVL=1 PAGER=/usr/bin/less GCC_SPECS='' GSETTINGS_BACKEND=dconf XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/14/bin _=/usr/bin/meson

1/4 test_output FAIL 0.01s exit status 13
15:06:08 MALLOC_PERTURB_=112 /var/tmp/portage/sys-apps/kmscon-9.0.0/work/kmscon-9.0.0-build/tests/test_output
----------------------------------- output -----------------------------------
stderr:
[0000.000000] NOTICE: /var/tmp/portage/sys-apps/kmscon-9.0.0/work/kmscon-9.0.0-build/tests/test_output Revision v9.0.0 Jul 1 2022 09:55:44 (log_print_init() in ../kmscon-9.0.0/src/shl_log.c:509)
[0000.000025] NOTICE: Creating video object using /dev/dri/card0... (main() in ../kmscon-9.0.0/tests/test_output.c:216)
[0000.007446] NOTICE: Wakeing up video object... (main() in ../kmscon-9.0.0/tests/test_output.c:231)
[0000.007456] ERROR: drm_shared: cannot set DRM-master (uterm_drm_video_wake_up() in ../kmscon-9.0.0/src/uterm_drm_shared.c:738)
[0000.008312] ERROR: init failed, errno -13: Permission denied (test_fail() in ../kmscon-9.0.0/tests/test_include.h:144)

2/4 test_key TIMEOUT 30.01s killed by signal 15 SIGTERM
15:06:08 MALLOC_PERTURB_=175 /var/tmp/portage/sys-apps/kmscon-9.0.0/work/kmscon-9.0.0-build/tests/test_key
----------------------------------- output -----------------------------------
stderr:
Quit with 'q' (maybe followed by 'enter'/'return')^M
Maybe your terminal may be unusable after this, use 'reset' to fix it^M

3/4 test_vt TIMEOUT 30.01s
15:06:08 MALLOC_PERTURB_=38 /var/tmp/portage/sys-apps/kmscon-9.0.0/work/kmscon-9.0.0-build/tests/test_vt
----------------------------------- output -----------------------------------
stderr:
[0000.000000] NOTICE: /var/tmp/portage/sys-apps/kmscon-9.0.0/work/kmscon-9.0.0-build/tests/test_vt Revision v9.0.0 Jul 1 2022 09:55:44 (log_print_init() in ../kmscon-9.0.0/src/shl_log.c:509)
[0000.004164] NOTICE: vt: using tty /dev/tty7 (open_tty() in ../kmscon-9.0.0/src/uterm_vt.c:285)

4/4 test_input TIMEOUT 30.03s
15:06:08 MALLOC_PERTURB_=143 /var/tmp/portage/sys-apps/kmscon-9.0.0/work/kmscon-9.0.0-build/tests/test_input
----------------------------------- output -----------------------------------
stderr:
[0000.000000] NOTICE: /var/tmp/portage/sys-apps/kmscon-9.0.0/work/kmscon-9.0.0-build/tests/test_input Revision v9.0.0 Jul 1 2022 09:55:44 (log_print_init() in ../kmscon-9.0.0/src/shl_log.c:509)

Summary of Failures:

1/4 test_output FAIL 0.01s exit status 13
2/4 test_key TIMEOUT 30.01s killed by signal 15 SIGTERM
3/4 test_vt TIMEOUT 30.01s
4/4 test_input TIMEOUT 30.03s

Ok: 0
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 3

@Aetf
Copy link
Owner

Aetf commented Jul 13, 2022

The existing tests are for manual testing only as they require inputs. I need to replace those with proper unit tests.

Will keep this as enhancement.

@Aetf Aetf changed the title Tests fail since move to meson Implement proper unit testing Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants