Commit Graph

174 Commits

Author SHA1 Message Date
Khem Raj fd3dde99fd Makefile: Set CC/AR variable only if it doesn't have a value
This helps it compile with clang or any other compilers besides gcc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2016-01-05 23:56:25 +01:00
Clark Williams 619c068b60 Makefile: fixed dropped quote in help target text
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22 22:26:31 +02:00
John Kacur 07371fae48 Makefile: Remove anything to do with rpms, specs etc
Remove anything to do with rpm, spec, release and so on that should be
maintained in distribution specific ways. One exception is make tarball,
which is useful in a more general way.

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22 17:30:52 +02:00
John Kacur 24f8c0175e Makefile: Version bump to v0.96
Version bump to v0.96 and changelog additions to rt-tests.spec-in

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22 12:29:10 +02:00
Henrik Austad ebe16ac451 Android: rename arch from bionic to android
Bionic is the libc implementation used in Android and should not be
confused with the architecture.

Cc: John Kacur <jkacur@redhat.com>
Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-22 10:32:41 +02:00
John Kacur afc0f753c3 Makefile: Move TARGETS back to a more logical place in the Makefile
Place TARGETS after sources. The evaluation of it doesn't depend on it's
position in the file, so remove the incorrect comment

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-14 14:49:22 +02:00
Clark Williams 32933aadb3 Makefile: have distclean remove .asc file for tarball
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-14 14:45:35 +02:00
John Kacur 01c2ad58d3 Makefile: OBJDIR should be an order-only-prerequisite
OBJDIR should be an order only prerequisite.
- create the OBJDIR if necessary before .d, .o and before all TARGETS
  including hwlatdetect
- Don't rebuild if the timestamp on the OBJDIR changes

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-14 14:39:33 +02:00
Clark Williams d68bda3d43 Makefile: add target to create OBJDIR before use
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-09 13:32:55 +02:00
John Kacur b921fb3d1f maintainence: VERSION bump and Change-log update
- Update the VERSION in the Makefile
- Update the Change-log in rt-tests.spec-in

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-07 14:33:05 +02:00
John Kacur d3bd5df707 Bionic: Move android functionality into it's own arch Makefile
- Make the Makefile more readable by moving android functionality to it's
own Makefile.
- Don't evaluate TARGETS until after including arch Makefiles

Signed-off-by: John Kacur <jkacur@redhat.com>
Tested-by: Henrik Austad <haustad@cisco.com>
2015-10-06 11:27:10 +02:00
John Kacur 8d26afdc2d Makefile: Only call cc -dumpmachine once in the makefile
- Store the result of cc -dumpmachine in the dumpmachine variable
- Use makefile parsing to obtain the ostype
- Use shell and sed functions to obtain the machinetype
- Turn on the bionic functionality if the ostype=android

Signed-off-by: John Kacur <jkacur@redhat.com>
Tested-by: Henrik Austad <haustad@cisco.com>
2015-10-06 11:27:10 +02:00
Uwe Kleine-König 6f3c1ba9e8 drop compiling without NPTL support
all programs apart from sendme use pthreads so NPTL=no is hardly useful
any more.

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-06 11:27:09 +02:00
John Kacur 7faa666c37 Makefile: Document certain compiling options
- Document compiling with and without NUMA, explaining the defaults
- Document compiling with HAVE_PARSE_CPUSTRING_ALL

Reorganize these options a little for readability

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-06 11:27:03 +02:00
John Kacur b482ecc2bf signaltest: Add a man page to signaltest
- Add a man page to signaltest
- Improve the display_help in signaltest
- Add install of new man page to makefile

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05 20:21:15 +02:00
John Kacur 788bb50b8f build: Generate .o, .a, and .d files in bld dir
When building rt-tests, object files, libs and .d (dependencies) were
all generated in the base directory. Instead, place all of these
build files in a dir called bld. The final programs are still in the
basedir

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05 16:15:00 +02:00
John Kacur 685fb2fd01 Explicitly separate VPATH paths with a colon
VPATH paths can be separated by either a space or a colon.
Explicitly insert a colon instead of relying on a space being inserted
due to the spacing of our Makefile

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-10-05 16:14:42 +02:00
John Kacur a8fd81efa7 Version bump to v0.94
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21 22:18:12 +02:00
Henrik Austad 88af643971 android: adjust target for android
Bionic (Android's libc implementation) lacks support for (amongst other
things) pthread_barriers and pthread_setaffinity. The former is removed
by ifdeffery, the latter is added as a per-android wrapper to
sched_setaffinity.

Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21 21:56:30 +02:00
Henrik Austad 2f83181e4b Makefile: add librttest to rt-migrate-test
linker must be able to resolve reference to err_msg_n properly

   rt-migrate-test.c:(.text+0x1ff): undefined reference to `err_msg_n'

Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21 21:55:33 +02:00
Henrik Austad 6750957ad4 Add a rebuild-switch to Makefile
Update from joshc for job-level safety

Co-authored.by: Josh Cartwright <joshc@ni.com>
Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21 21:40:27 +02:00
Henrik Austad 2b57b74ffa Add CROSS_COMPILE-switch to CC and AR
Signed-off-by: Henrik Austad <haustad@cisco.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-21 21:40:08 +02:00
Josh Cartwright 3991c7bf04 rt-tests: workaround poor gzip implementations
Some 'gzip' implementations, in particular 'pigz' don't properly handle
the '-c' argument if it's passed after the name of the input files.

Work around this by putting the '-c' option before the file names.

Inspired by patches in OpenEmbedded by Robert Yang and Kai Kang.

Cc: Robert Yang <liezhi.yang@windriver.com>
Cc: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02 14:57:04 +02:00
Darren Hart d39e249a4a rt-tests: Break out install_hwlatdetect
Allow hwlatdetect to be installed independently of the rest of the
tests. This is convenient for build systems that package it separately
due to the python dependency.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Clark Williams <williams@redhat.com>
CC: John Kacur <jkacur@redhat.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02 14:54:51 +02:00
Darren Hart d9f3e351d3 rt-tests: Allow for user-specified PYLIB
Allow users (build systems) to specify PYLIB. This allows for a
cross-build-system to specify the target PYLIB rather than the host
PYLIB.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Clark Williams <williams@redhat.com>
CC: John Kacur <jkacur@redhat.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-09-02 14:52:46 +02:00
Clark Williams 6855394943 Version bump to v0.93
Signed-off-by: Clark Williams <williams@redhat.com>
2015-08-12 14:09:28 -05:00
John Kacur a67ec68b94 Create an rt-tests.tar file using git-archive
Create an rt-tests.tar file using git-archive so we don't mistakenly
pull in uncommitted files

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09 15:32:40 +02:00
John Kacur b6b5c594b2 Change VERSION_STRING to VERSION
Adding _STRING doesn't add any extra meaning, but the extra length makes
the Makefile more unreadable than is necessary, so shorten this up

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09 14:31:01 +02:00
Clark Williams 5f9f1e3fe3 makefile: fixed release target
Added MAINTAINERS, doc and README.markdown to the tar archive
generation logic.

Signed-off-by: Clark Williams <williams@redhat.com>
2015-06-09 08:57:17 -05:00
John Kacur 4f891fbf1e Version bump to v0.92
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09 14:34:42 +02:00
John Kacur cc0901e72d Allow building with -DHAVE_PARSE_CPUSTRING_ALL
This is a temporary solution until we have time to look into autotools
If you know that you are building on a system that has
numa_parse_cpustring_all()

Then you can type
make HAVE_PARSE_CPUSTRING_ALL=1
to define it.

If you omit that, then the default is the old behaviour that uses
numa_parse_cpustring((char *)s)

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-05-27 22:51:42 +02:00
Michael Olbrich bf74ac4067 Makefile: cleanup linking to librttest.a
Only add '-lrttest -L.' where it's actually needed.
Use '$<' instead of '$^'. Otherwise librttest is added twice:
As 'librttest.a' and as '-lrttest'.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-03-03 19:54:05 +01:00
Michael Olbrich 4f09abf780 Makefile: pi_stress need librttest.a so it should depend on it
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-02-24 15:28:33 +01:00
Clark Williams 3fed00ff8d version bump to 0.91
Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17 14:41:37 -06:00
Clark Williams 48d20ffd06 version bump to 0.90
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-27 10:26:12 -06:00
Alexey Brodkin c68419b628 Makefile: allow building selected tests with non-NPTL toolchain
Some architectures are still stuck with non-NPTL toolchains.
These are for example ARC, Blackfin, Xtensa etc.

Still rt-tests are very good benchmarks and it would be good to enable use of
at least selected (those that will be built) tests on those architectures.

This change makes it possible to only build subset of tests that don't require
NPTL calls.

By default behavior is not modified - all tests are built, but if one wants
to build with non-NPTL toolchain just add "HAVE_NPTL=no" in command line
or modify "HAVE_NPTL" variable right in Makefile and execute "make".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Clark Williams <clark.williams@gmail.com>
2015-01-15 16:31:20 -06:00
Daniel Wagner ef2dee4232 rt-sched: Add sched_setattr/sched_getattr API
Until we have a proper libc implementation we maintain a simple
version of it. We this new API we are able to use SCHED_DEADLINE.

This is shamelessly stolen from Dario Faggioli's libdl.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Dario Faggioli <raistlin@linux.it>
2014-11-06 15:43:41 -06:00
Clark Williams 9164ec4db2 version bump to 0.89
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-30 11:16:44 -05:00
Clark Williams a7fbe4c58b version bump to 0.88
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-28 09:26:31 -05:00
Clark Williams b0413ae5ed version bump to 0.87
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-12-11 16:43:14 -06:00
Clark Williams 7ff65cfa9d updated Makefile and do-git-push script to use kup
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-15 15:39:21 -06:00
Clark Williams 4ab63398b9 version bump to 0.86
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-15 09:50:49 -06:00
John Kacur b2689a768a Makefile: Don't tag files in dir BUILD from rpm builds
Don't tag copies of files in BUILD created when building an rpm
Without this change tags finds both copies, eg: for tag cyclictest.c
  # pri kind tag               file
  1 F   F    cyclictest.c      BUILD/rt-tests/src/cyclictest/cyclictest.c
               1
  2 F   F    cyclictest.c      src/cyclictest/cyclictest.c

With this change, only the later one is found

Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15 15:02:21 +01:00
Frank Rowand 7ffb5a6e20 rt-tests: NUMA optional for make rpm
version 2:
  - Add new placeholders in rt-tests.spec-in to make the replacements by
    "make rpm" more visible to future maintainers of rt-tests.spec-in
  - fix typo of my name in rt-tests.spec-in

rt-tests can be built without NUMA:

   make NUMA=0

But "make rpm" does not have a way to be successful without NUMA:

   build_rt-tests_0.85> make rpm
   for F in cyclictest signaltest pi_stress rt-migrate-test ptsematest sigwaittest svsematest pmqtest sendme pip_stress hackbench *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d *.a  ChangeLog; do find -type f -name $F | xargs rm -f; done
   rm -f hwlatdetect
   rm -f tags
   rm -rf BUILD BUILDROOT RPMS SRPMS SPECS releases *.tar.gz rt-tests.spec tmp
   git log >ChangeLog
   mkdir -p releases
   mkdir -p tmp/rt-tests
   cp -r Makefile COPYING ChangeLog src tmp/rt-tests
   tar -C tmp -czf rt-tests-0.85.tar.gz rt-tests
   rm -f ChangeLog
   cp rt-tests-0.85.tar.gz releases
   sed s/__VERSION__/0.85/ <rt-tests.spec-in >rt-tests.spec
   rpmbuild -ba --define "_topdir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85" --define "_sourcedir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/releases" --define "_builddir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/BUILD"  rt-tests.spec
   error: Failed build dependencies:
           numactl-devel is needed by rt-tests-0.85-1.fc12.src
   make: *** [rpm] Error 1

The following patch allows the rpm to be built without NUMA, with the command:

   make NUMA=0 rpm

Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15 14:54:43 +01:00
John Kacur cc7b99bf4e Makefile: Add BUILDROOT and SPECS to the dirs to remove for distclean
make rpm creates the dirs BUILDROOT and SPECS that are missed by distclean.
Gather all rpm related DIRS to the RPMDIRS and add that to distclean.

Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-02-15 14:46:35 +01:00
John Kacur d29d951dbe Makefile: Add tmp dir to distclean and "make release" call distclean
The files in the tmp dir are generated during make release.
These are the kind of generated files that should be removed for distclean,
So add tmp. make release can be slightly simplified by then depending
on distclean instead of clean.

Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-02-15 14:46:10 +01:00
John Kacur 0918c34eff Makefile: Don't tag tmp files created when making a release
Don't tag the copies of the source files placed in the tmp directory
during the creation of a release.
Without this change tags finds both copies, eg: for tag cyclictest.c
  # pri kind tag               file
  1 F C F    cyclictest.c      src/cyclictest/cyclictest.c
               1
  2 F   F    cyclictest.c      tmp/rt-tests/src/cyclictest/cyclictest.c
               1

With this change only the first one is found.

Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-02-15 14:45:44 +01:00
Clark Williams 210e625227 version bump to 0.85
Signed-off-by: Clark Williams <williams@redhat.com>
2012-11-13 16:02:04 -06:00
John Kacur 2400e5e3b5 rt-tests Makefile: Add CPPFLAGS to the pattern rule to generate dependencies
Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17 00:22:33 +02:00
Uwe Kleine-König dfcef6e557 rt-tests Makefile: separate CFLAGS and CPPFLAGS
For compilation to work

        -D_GNU_SOURCE -Isrc/include

is needed to be passed to the compiler. For Debian packaging several
things are added but not these two from above. So be a bit more friendly
and add them unconditionally. There is no harm if they are included in
the user supplied CFLAGS and so passed twice.

Moreover be a bit more correct about CFLAGS/CPPFLAGS. Both should be
passed to the compiler with CFLAGS taking options for the compiler and
CPPFLAGS taking options for the preprocessor. This is also needed for
Debian packaging where the helper scripts set CPPFLAGS.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17 00:22:11 +02:00