anitazha / rpms / ndctl

Forked from rpms/ndctl 2 years ago
Clone
Bryan Gurney bb0dc7
#!/bin/bash
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
# Copyright (c) 2016 Red Hat, Inc.
Bryan Gurney bb0dc7
# #
Bryan Gurney bb0dc7
# # This program is free software: you can redistribute it and/or modify
Bryan Gurney bb0dc7
# # it under the terms of the GNU General Public License as published by
Bryan Gurney bb0dc7
# # the Free Software Foundation, either version 3 of the License, or
Bryan Gurney bb0dc7
# # (at your option) any later version.
Bryan Gurney bb0dc7
# #
Bryan Gurney bb0dc7
# # This program is distributed in the hope that it will be useful,
Bryan Gurney bb0dc7
# # but WITHOUT ANY WARRANTY; without even the implied warranty of
Bryan Gurney bb0dc7
# # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Bryan Gurney bb0dc7
# # GNU General Public License for more details.
Bryan Gurney bb0dc7
# #
Bryan Gurney bb0dc7
# # You should have received a copy of the GNU General Public License
Bryan Gurney bb0dc7
# # along with this program.  If not, see <http://www.gnu.org/licenses/>.
Bryan Gurney bb0dc7
#
Bryan Gurney bb0dc7
# # Author: Yi Zhang  <yizhan@redhat.com>
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
.PHONY: all install download clean LICENSE
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
BUILT_FILES=
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
FILES=$(METADATA) Makefile PURPOSE main.sh
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
run: $(FILES) build
Bryan Gurney bb0dc7
	./main.sh
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
build: $(BUILT_FILES)
Bryan Gurney bb0dc7
	chmod a+x ./main.sh
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
clean:
Bryan Gurney bb0dc7
	rm -f *~ *.rpm $(BUILT_FILES)
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
$(METADATA): Makefile
Bryan Gurney bb0dc7
	@touch $(METADATA)
Bryan Gurney bb0dc7
	@echo "Owner:        Yi Zhang <yizhan@redhat.com>" > $(METADATA)
Bryan Gurney bb0dc7
	@echo "Name:         $(TEST)" >> $(METADATA)
Bryan Gurney bb0dc7
	@echo "Path:         $(TEST_DIR)"	>> $(METADATA)
Bryan Gurney bb0dc7
	@echo "License:      GPLv3" >> $(METADATA)
Bryan Gurney bb0dc7
	@echo "TestVersion:  $(TESTVERSION)"	>> $(METADATA)
Bryan Gurney bb0dc7
	@echo "Description:  ndctl sanity test" >> $(METADATA)
Bryan Gurney bb0dc7
	@echo "TestTime:     15m" >> $(METADATA)
Bryan Gurney bb0dc7
	@echo "RunFor:       ndctl" >> $(METADATA)
Bryan Gurney bb0dc7
	@echo "Requires:     ndctl" >> $(METADATA)
Bryan Gurney bb0dc7
Bryan Gurney bb0dc7
	rhts-lint $(METADATA)