Skip to content

Commit

Permalink
Merge pull request #3730 from regro/qt-tests
Browse files Browse the repository at this point in the history
test: allow for xz extension in flaky qt test
  • Loading branch information
beckermr authored Feb 17, 2025
2 parents 013fe73 + c2ad2cf commit 52c354d
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 18 deletions.
60 changes: 42 additions & 18 deletions tests/test_qt_qt_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[
(
"qtqtmain_octave_before_meta.yaml",
"qtqtmain_octave_after_meta.yaml",
("qtqtmain_octave_after_meta.yaml", "qtqtmain_octave_xz_after_meta.yaml"),
"7.1.0",
),
("qtqtmain_qgis_before_meta.yaml", "qtqtmain_qgis_after_meta.yaml", "3.18.3"),
Expand All @@ -29,20 +29,44 @@ def test_qt_main(old_meta, new_meta, new_ver, tmpdir):
with open(os.path.join(YAML_PATH, old_meta)) as fp:
in_yaml = fp.read()

with open(os.path.join(YAML_PATH, new_meta)) as fp:
out_yaml = fp.read()

run_test_migration(
m=VERSION_WITH_QTQTMAIN,
inp=in_yaml,
output=out_yaml,
kwargs={"new_version": new_ver},
prb="Dependencies have been updated if changed",
mr_out={
"migrator_name": Version.name,
"migrator_version": VERSION_WITH_QTQTMAIN.migrator_version,
"version": new_ver,
},
tmpdir=tmpdir,
should_filter=False,
)
if isinstance(new_meta, tuple):
out_yamls = []

for nm in new_meta:
with open(os.path.join(YAML_PATH, nm)) as fp:
out_yamls.append(fp.read())
else:
with open(os.path.join(YAML_PATH, new_meta)) as fp:
out_yamls = [fp.read()]

failed = []
excepts = []
for out_yaml in out_yamls:
try:
run_test_migration(
m=VERSION_WITH_QTQTMAIN,
inp=in_yaml,
output=out_yaml,
kwargs={"new_version": new_ver},
prb="Dependencies have been updated if changed",
mr_out={
"migrator_name": Version.name,
"migrator_version": VERSION_WITH_QTQTMAIN.migrator_version,
"version": new_ver,
},
tmpdir=tmpdir,
should_filter=False,
)
except Exception as e:
failed.append(True)
excepts.append(e)
else:
failed.append(False)
excepts.append(None)

if all(failed):
for e in excepts:
if e is not None:
raise e

assert not all(failed)
142 changes: 142 additions & 0 deletions tests/test_yaml/qtqtmain_octave_xz_after_meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{% set version = "7.1.0" %}

package:
name: octave
version: {{ version }}

source:
url: https://ftp.gnu.org/gnu/octave/octave-{{ version }}.tar.xz
sha256: 3fd4615ebbab02c38c93ea6ba318756aedec38d98a5c732d409899e8b4356273

build:
number: 0
skip: true # [win]
binary_has_prefix_files: # [unix]
- bin/octave-{{ version }} # [linux]

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }}
- make # [linux]
- automake
- sed
- perl
- ghostscript
- pkg-config # [linux]
- libgomp # [linux]
- llvm-openmp # [osx]
- bison
- gperf
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxfixes') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
- {{ cdt('libxcb') }} # [linux]
- {{ cdt('expat') }} # [linux]
- {{ cdt('libxext') }} # [linux]
- {{ cdt('libxrender') }} # [linux]
- {{ cdt('libxt') }} # [linux]
- {{ cdt('libxft') }} # [linux]
- {{ cdt('libx11-devel') }} # [linux]
- {{ cdt('xorg-x11-proto-devel') }} # [linux]
host:
- libblas
- libcblas
- liblapack
- liblapacke
- libglu # [linux]
- pcre
- ghostscript
- sundials
- readline
- arpack
- curl
- libcurl
- fftw
- fontconfig
- freetype
- glpk
- gnuplot
- hdf5
- suitesparse
- zlib
- bzip2
- portaudio
- libsndfile
- qscintilla2
- qhull
- graphicsmagick # [linux]
# Following gets linked at the end.
- icu
- ncurses
- xz
- libxml2
- libpng
- glib
- qt-main
- openssl
- texinfo
- gl2ps
- fltk
- libiconv
- alsa-lib # [linux]
run:
- ghostscript
- texinfo
- gl2ps
- libglu # [linux]
- fltk
- pcre
- readline
- arpack
- curl
- sundials
- {{ pin_compatible("fftw", max_pin="x.x") }}
- fontconfig
- freetype
- glpk
- gnuplot
- hdf5
- {{ pin_compatible("suitesparse", max_pin="x.x") }}
- zlib
- bzip2
- {{ pin_compatible("portaudio") }}
- libsndfile
- {{ pin_compatible("qscintilla2", max_pin="x.x") }}
- qhull
- {{ pin_compatible("graphicsmagick") }} # [linux]
# Following gets linked at the end.
- icu
- ncurses
- xz
- libxml2
- libpng
- glib
- qt-main
- openssl

test:
requires:
- coreutils
commands:
- octave --version
- touch test_file.txt
- octave test_file.txt

about:
home: https://www.gnu.org/software/octave/
license: GPL-3.0-or-later
license_file: COPYING
doc_url: https://www.gnu.org/software/octave/doc/interpreter/
summary: GNU Octave is a high-level language, primarily intended for numerical computations

extra:
recipe-maintainers:
- isuruf
- ocefpaf
- izahn
- ngam

0 comments on commit 52c354d

Please sign in to comment.