Skip to content

Commit

Permalink
Merge pull request #21 from tpiekarski/feature/integrating-travis-ci
Browse files Browse the repository at this point in the history
Merging feature/integrating-travis-ci, resolves #9
  • Loading branch information
tpiekarski committed May 8, 2020
2 parents 9085d2b + d850439 commit 5b459c7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: c
compiler: gcc
dist: bionic
os: linux
env:
global:
- MAKEFLAGS="-j $(nproc)"

install:
- sudo apt-get update
- sudo apt-get install make -y "linux-headers-$(uname -r)"

script:
- make clean
- make test debug=0
- make test debug=1

notifications:
email: false
17 changes: 13 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ SHELL:=/bin/bash
ccflags-y := -std=gnu99 -Wall -Wno-declaration-after-statement $(DEBUG_FLAGS)
obj-m += pretty_printk_demo.o


all: license clean demo

demo:
$(MAKE) -C $(BUILD) M=$(PWD) modules

clean:
$(MAKE) -C $(BUILD) M=$(PWD) clean

demo:
$(MAKE) -C $(BUILD) M=$(PWD) modules

license:
@echo -e " pretty-printk::Makefile\n\n \
pretty-printk is free software: you can redistribute it and/or modify\n \
Expand All @@ -51,3 +50,13 @@ license:
GNU General Public License for more details.\n\n \
You should have received a copy of the GNU General Public License\n \
along with pretty-printk. If not, see <https://www.gnu.org/licenses/>.\n"

test:
$(MAKE) license demo debug=$(debug)
@sudo dmesg -C
@sudo insmod pretty_printk_demo.ko
@sudo dmesg
@sudo rmmod pretty_printk_demo
$(MAKE) clean

@echo ">> Test target with debug=$(debug) has run successfully."
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# pretty-printk

[![Build Status](https://travis-ci.org/tpiekarski/pretty-printk.svg?branch=master)](https://travis-ci.org/tpiekarski/pretty-printk)

[Overview](#overview) / [Usage](#usage) / [Features](#features) / [License](#license) / [Links](#links)

## [Overview](#overview)
Expand Down

0 comments on commit 5b459c7

Please sign in to comment.