Bug 1031929 - The default target of v7/tests/Makefile should do necessary compilation work rather than cleaning the files when executing make
The default target of v7/tests/Makefile should do necessary compilation work ...
Status: CLOSED ERRATA
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Test Suite (tests) (Show other bugs)
1.7.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: CAI Qian
Brian Brock
:
Depends On:
Blocks: 1016295
  Show dependency treegraph
 
Reported: 2013-11-19 02:25 EST by Dong Zhu
Modified: 2016-06-03 09:59 EDT (History)
5 users (show)

See Also:
Fixed In Version: hwcert-client 1.7.0-20131119.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-13 10:57:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch refine hwcert Makefile to make sure tests do necessary compilation work rather than cleaning/installing the files (4.78 KB, patch)
2013-11-19 05:11 EST, Dong Zhu
gnichols: review+
Details | Diff

  None (edit)
Description Dong Zhu 2013-11-19 02:25:41 EST
Description of problem:
When executing "make" command under tests directory, since the first target is clean of Makefile, it will perform "make clean" for each test. It is not correct and supposed to do some necessary compilation work instead.

Version-Release number of selected component (if applicable):
hwcert-client 1.7.0-62
Comment 1 Dong Zhu 2013-11-19 05:11:23 EST
Created attachment 825995 [details]
patch refine hwcert Makefile to make sure tests do necessary compilation work rather than cleaning/installing the files
Comment 2 Greg Nichols 2013-11-19 17:04:49 EST
I can't build the package with the patch.  If I do:

typically, I've done the following to build the package:

(As root)
make clean
make install
(as user)
make rpm
make srpm

Now when I do this I get rpm errors about arch-dependant files in a noarch package.

I think it's because "install" builds binaries in some of the tests with the patch.

I think the patch has confused the meaning of "install".

For the package, it means install the sources (mostly python).

For the tests, and means compilation in some cases.

So I don't think it's a good idea to have the default action "install" for the tests.
Comment 3 Greg Nichols 2013-11-19 18:20:11 EST
I just removed the "all" target from tests/Makefile.  Seems to work.
Comment 4 Dong Zhu 2013-11-20 02:08:35 EST
We got this error because we want to build a noarch package which could be run on different arch. And in the process of rpmbuild will execute make, so under tests/ with "all" target some tests would be compiled.Then we got this error "Arch dependent binaries in noarch package". OTOH, If we wanna get a package which is specific to X86_64, like this hwcert-client-1.7.0-64.el7.x86_64.rpm in this case this error doesn't exist anymore. 

So I think removing the "all" target from tests/Makefile will fix this issue.

Note You need to log in before you can comment on or make changes to this bug.