Skip to content

Commit

Permalink
updated YaST RPM macros
Browse files Browse the repository at this point in the history
added support for Rake based packages, optionally
run additional tests (used at Jenkins CI builds)

- 3.1.39
  • Loading branch information
lslezak committed Feb 18, 2016
1 parent 2bbdf5e commit 7b23de0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 11 deletions.
42 changes: 32 additions & 10 deletions build-tools/rpm/macros.yast
Expand Up @@ -67,13 +67,32 @@
%{__make} %{?jobs:-j%jobs}%{?!jobs:%{?_smp_mflags:%_smp_mflags}} \
%endif # "x%%{?make_build}" != "x"

# Run the tests, when "--with=yast_run_ci_tests" osc option is set some
# additional tests are executed (rubocop, spell check...).
%yast_check \
if [ ! -f "%{yast_ydatadir}/devtools/NO_MAKE_CHECK" ]; then \
%if %{with yast_run_ci_tests} \
if [ -f "configure.in.in" ]; then \
# TODO: fix the check:ci task to also work with autotools based modules \
%{__make} check \\\
VERBOSE=1 \\\
Y2DIR="%{buildroot}/%{yast_dir}" \\\
DESTDIR="%{buildroot}" \
fi
elif [ -f "Rakefile" ]; then \
# TODO: coveralls support \
LC_ALL=en_US.utf8 rake --verbose --trace check:ci \
fi \
%else \
if [ ! -f "%{yast_ydatadir}/devtools/NO_MAKE_CHECK" ]; then \
if [ -f "configure.in.in" ]; then \
%{__make} check \\\
VERBOSE=1 \\\
Y2DIR="%{buildroot}/%{yast_dir}" \\\
DESTDIR="%{buildroot}" \
elif [ -f "Rakefile" ]; then \
rake test:unit \
fi \
fi \
%endif

%yast_desktop_files \
\
Expand All @@ -92,11 +111,14 @@

# install the yast module using autotools/make
%yast_install \
%make_install \
\
# on SUSE run %%yast_check within %%install \
# other distris may choose to run them during %%check \
%if 0%{?suse_version} || 0%{?yast_check_during_install} \
%yast_check \
%endif # 0%%{?suse_version} || 0%%{?yast_check_during_install} \
%yast_desktop_files
if [ -f "configure.in.in" ]; then \
%make_install \
# on SUSE run %%yast_check within %%install \
# other distris may choose to run them during %%check \
%if 0%{?suse_version} || 0%{?yast_check_during_install} \
%yast_check \
%endif # 0%%{?suse_version} || 0%%{?yast_check_during_install} \
elif [ -f "Rakefile" ]; then \
rake install DESTDIR="%{buildroot}" \
fi \
%yast_desktop_files \
7 changes: 7 additions & 0 deletions package/yast2-devtools.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Feb 9 15:31:34 UTC 2016 - lslezak@suse.cz

- YaST RPM macros - add support for Rake based packages, optionally
run additional tests (used at Jenkins CI builds)
- 3.1.39

-------------------------------------------------------------------
Wed Aug 5 16:57:29 CEST 2015 - shundhammer@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-devtools.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-devtools
Version: 3.1.38
Version: 3.1.39
Release: 0
Url: http://github.com/yast/yast-devtools

Expand Down

0 comments on commit 7b23de0

Please sign in to comment.