Bug 1031929

Summary: The default target of v7/tests/Makefile should do necessary compilation work rather than cleaning the files when executing make
Product: [Retired] Red Hat Hardware Certification Program Reporter: Dong Zhu <dZhu>
Component: Test Suite (tests)Assignee: Qian Cai <qcai>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.7.0CC: bbrock, brose, gnichols, qcai, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 14:57:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1016295    
Attachments:
Description Flags
patch refine hwcert Makefile to make sure tests do necessary compilation work rather than cleaning/installing the files gnichols: review+

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.