blob: 2a9bb30e58a0bd685c4d4d9c12e5656e77807c69 [file] [log] [blame]
Joey Armstrong65405412022-11-22 10:43:06 -05001# -*- makefile -*-
Joey Armstrong3f575f72023-01-15 23:49:19 -05002# -----------------------------------------------------------------------
3# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# -----------------------------------------------------------------------
Joey Armstrong65405412022-11-22 10:43:06 -050017
Zack Williamsc2140b92018-04-05 09:19:22 -070018# Makefile for testing JJB jobs in a virtualenv
Joey Armstrong068d6452023-02-01 11:09:18 -050019.PHONY: help clean help test
20.DEFAULT_GOAL := help
Zack Williamsc2140b92018-04-05 09:19:22 -070021
Joey Armstrong3f575f72023-01-15 23:49:19 -050022##-------------------##
23##---] GLOBALS [---##
24##-------------------##
25TOP ?= .
26MAKEDIR ?= $(TOP)/makefiles
Joey Armstrong068d6452023-02-01 11:09:18 -050027export SHELL := bash -e -o pipefail# # [TODO] remove once set -u cleaned up
Joey Armstrong3f575f72023-01-15 23:49:19 -050028
Joey Armstrong3f575f72023-01-15 23:49:19 -050029##--------------------##
30##---] INCLUDES [---##
31##--------------------##
Joey Armstrong980e37f2023-02-28 18:57:41 -050032include config.mk
Joey Armstrong3f575f72023-01-15 23:49:19 -050033include $(MAKEDIR)/include.mk
34
Zack Williamsc2140b92018-04-05 09:19:22 -070035VENV_DIR ?= venv-jjb
Joey Armstrong0895a882023-02-06 14:50:39 -050036JJB_VERSION ?= 2.8.0
Joey Armstrong3f575f72023-01-15 23:49:19 -050037# JJB_VERSION ?= 4.1.0
Zack Williamsc2140b92018-04-05 09:19:22 -070038JOBCONFIG_DIR ?= job-configs
39
Joey Armstrong01bbf8d2023-03-05 06:20:14 -050040# -----------------------------------------------------------------------
41# horrible dep: (ie -- .PHONY: $(JOBCONFIG_DIR))
42# o Directory inode always changing due to (time-last-accessed++).
43# o Dependent Targets always re-made due to setale dependency.
44# o Use file inside directory as dep rather than a directory.
45# -----------------------------------------------------------------------
Zack Williamsc2140b92018-04-05 09:19:22 -070046$(JOBCONFIG_DIR):
47 mkdir $@
48
Joey Armstrong01bbf8d2023-03-05 06:20:14 -050049##-------------------##
50##---] TARGETS [---##
51##-------------------##
52include $(MAKEDIR)/targets/check.mk
53include $(MAKEDIR)/targets/tox.mk# # python unit testing
54include $(MAKEDIR)/targets/test.mk
Joey Armstrong3f575f72023-01-15 23:49:19 -050055
Joey Armstrong068d6452023-02-01 11:09:18 -050056## Display make help late
Joey Armstrong3f575f72023-01-15 23:49:19 -050057include $(ONF_MAKE)/help/trailer.mk
Joey Armstrong65405412022-11-22 10:43:06 -050058
59# [EOF]