Skip to content

Commit

Permalink
Merge branch 'qmk:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lokher authored Dec 20, 2021
2 parents 03194af + 0e18f03 commit fb3ec91
Show file tree
Hide file tree
Showing 5,362 changed files with 72,721 additions and 56,001 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ keymap:
via:
- keyboards/**/keymaps/via/*
cli:
- bin/qmk
- requirements.txt
- lib/python/**/*
python:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on:
push:
branches:
- master
- future
- develop
pull_request:
paths:
- 'lib/python/**'
- 'bin/qmk'
- 'requirements.txt'
- '.github/workflows/cli.yml'

Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Unit Tests

on:
push:
branches:
- master
- develop
pull_request:
paths:
- 'builddefs/**'
- 'quantum/**'
- 'platforms/**'
- 'tmk_core/**'
- 'tests/**'
- '*.mk'
- 'Makefile'
- '.github/workflows/unit_test.yml'

jobs:
test:
runs-on: ubuntu-latest

container: qmkfm/base_container

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Run tests
run: make test:all
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ __pycache__

# Allow to exist but don't include it in the repo
user_song_list.h

# clangd
compile_commands.json
.clangd/
.cache/
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
path = lib/chibios-contrib
url = https://github.com/qmk/ChibiOS-Contrib
branch = master
[submodule "lib/ugfx"]
path = lib/ugfx
url = https://github.com/qmk/uGFX
branch = master
[submodule "lib/googletest"]
path = lib/googletest
url = https://github.com/qmk/googletest
Expand Down
46 changes: 7 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ endif
endif

# Determine which qmk cli to use
ifeq (,$(shell which qmk))
QMK_BIN = bin/qmk
else
QMK_BIN = qmk
endif
QMK_BIN := qmk

# avoid 'Entering|Leaving directory' messages
MAKEFLAGS += --no-print-directory
Expand All @@ -58,8 +54,6 @@ BUILD_DIR := $(ROOT_DIR)/.build
TEST_DIR := $(BUILD_DIR)/test
ERROR_FILE := $(BUILD_DIR)/error_occurred

MAKEFILE_INCLUDED=yes

# Helper function to process the newt element of a space separated path
# It works a bit like the traditional functional head tail
# so the CURRENT_PATH_ELEMENT will become the new head
Expand Down Expand Up @@ -97,31 +91,8 @@ distclean: clean
rm -f *.bin *.hex *.uf2
echo 'done.'

#Compatibility with the old make variables, anything you specify directly on the command line
# always overrides the detected folders
ifdef keyboard
KEYBOARD := $(keyboard)
endif
ifdef keymap
KEYMAP := $(keymap)
endif

# Uncomment these for debugging
# $(info Keyboard: $(KEYBOARD))
# $(info Keymap: $(KEYMAP))


# Set the default goal depending on where we are running make from
# this handles the case where you run make without any arguments
.DEFAULT_GOAL := all:all
ifneq ($(KEYMAP),)
.DEFAULT_GOAL := $(KEYBOARD):$(KEYMAP)
else ifneq ($(KEYBOARD),)
# Inside a keyboard folder, build all keymaps for all subprojects
# Note that this is different from the old behaviour, which would
# build only the default keymap of the default keyboard
.DEFAULT_GOAL := $(KEYBOARD):all
endif


# Compare the start of the RULE variable with the first argument($1)
Expand Down Expand Up @@ -245,10 +216,6 @@ define PARSE_RULE
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell util/list_keyboards.sh | sort -u)),true)
KEYBOARD_RULE=$$(MATCHED_ITEM)
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
# Otherwise use the KEYBOARD variable, which is determined either by
# the current directory you run make from, or passed in as an argument
else ifneq ($$(KEYBOARD),)
$$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD)))
else
$$(info make: *** No rule to make target '$1'. Stop.)
$$(info |)
Expand Down Expand Up @@ -411,11 +378,12 @@ define PARSE_ALL_KEYMAPS
endef

define BUILD_TEST
TEST_NAME := $1
TEST_PATH := $1
TEST_NAME := $$(notdir $$(TEST_PATH))
MAKE_TARGET := $2
COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET)
MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)"
MAKE_VARS := TEST=$$(TEST_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD))
ifneq ($$(MAKE_TARGET),clean)
Expand All @@ -439,7 +407,7 @@ define PARSE_TEST
ifeq ($$(TEST_NAME),all)
MATCHED_TESTS := $$(TEST_LIST)
else
MATCHED_TESTS := $$(foreach TEST,$$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME),$$(TEST)),$$(TEST),))
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME), $$(notdir $$(TEST))), $$(TEST),))
endif
$$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET))))
endef
Expand All @@ -458,7 +426,8 @@ define SET_SILENT_MODE
endif
endef

include $(ROOT_DIR)/message.mk
include paths.mk
include $(BUILDDEFS_PATH)/message.mk

ifeq ($(strip $(BREAK_ON_ERRORS)), yes)
HANDLE_ERROR = exit 1
Expand Down Expand Up @@ -494,7 +463,6 @@ endef
ifndef SKIP_GIT
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
if [ ! -e lib/vusb ]; then git submodule sync lib/vusb && git submodule update --depth 50 --init lib/vusb; fi
if [ ! -e lib/printf ]; then git submodule sync lib/printf && git submodule update --depth 50 --init lib/printf; fi
Expand Down
58 changes: 0 additions & 58 deletions bin/qmk

This file was deleted.

23 changes: 13 additions & 10 deletions build_full_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

#include $(TMK_PATH)/protocol.mk
$(TEST)_INC := \
tests\test_common\common_config.h

TEST_PATH=tests/$(TEST)

$(TEST)_SRC= \
$(TEST_PATH)/keymap.c \
$(TEST)_SRC := \
$(TMK_COMMON_SRC) \
$(QUANTUM_SRC) \
$(SRC) \
tests/test_common/keymap.c \
tests/test_common/matrix.c \
tests/test_common/test_driver.cpp \
tests/test_common/keyboard_report_util.cpp \
tests/test_common/test_fixture.cpp
$(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
tests/test_common/test_fixture.cpp \
tests/test_common/test_keymap_key.cpp \
tests/test_common/test_logger.cpp \
$(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))

$(TEST)_DEFS := $(TMK_COMMON_DEFS) $(OPT_DEFS)

$(TEST)_CONFIG := $(TEST_PATH)/config.h

$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS)
$(TEST)_CONFIG=$(TEST_PATH)/config.h
VPATH+=$(TOP_DIR)/tests/test_common
VPATH += $(TOP_DIR)/tests/test_common
Loading

0 comments on commit fb3ec91

Please sign in to comment.