Bug 1031929 - The default target of v7/tests/Makefile should do necessary compilation work rather than cleaning the files when executing make
Summary: The default target of v7/tests/Makefile should do necessary compilation work ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Test Suite (tests)
Version: 1.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Qian Cai
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks: 1016295
TreeView+ depends on / blocked
 
Reported: 2013-11-19 07:25 UTC by Dong Zhu
Modified: 2016-06-03 13:59 UTC (History)
5 users (show)

Fixed In Version: hwcert-client 1.7.0-20131119.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-13 14:57:27 UTC


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 10:11 UTC, Dong Zhu
gnichols: review+
Details | Diff

Description Dong Zhu 2013-11-19 07:25:41 UTC
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 10:11:23 UTC
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 22:04:49 UTC
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 23:20:11 UTC
I just removed the "all" target from tests/Makefile.  Seems to work.

Comment 4 Dong Zhu 2013-11-20 07:08:35 UTC
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.