File tree Expand file tree Collapse file tree 4 files changed +41
-5
lines changed Expand file tree Collapse file tree 4 files changed +41
-5
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ function build_example()
4
+ {
5
+ make -C examples || exit 1
6
+ }
7
+
8
+ function list_mod()
9
+ {
10
+ # following list will contain all file names which are not specified in file non-working.
11
+ echo ` ls examples/* .ko | awk -F " [/|.]" ' {print $2}' | grep -vFxf .ci/non-working`
12
+ }
13
+
14
+ # test module 2 times
15
+ function run_mod()
16
+ {
17
+ ( sudo insmod " examples/$1 .ko" && sudo rmmod " $1 " ) || exit 1;
18
+ ( sudo insmod " examples/$1 .ko" && sudo rmmod " $1 " ) || exit 1;
19
+ }
20
+
21
+ function run_examples()
22
+ {
23
+ for module in $( list_mod) ; do
24
+ echo " $module "
25
+ run_mod " $module "
26
+ done
27
+ }
28
+
29
+ build_example
30
+ run_examples
Original file line number Diff line number Diff line change
1
+ bottomhalf
2
+ intrpt
3
+ kbleds
Original file line number Diff line number Diff line change @@ -36,13 +36,14 @@ jobs:
36
36
tag_name : " latest"
37
37
prerelease : true
38
38
39
- coding_style :
39
+ validate :
40
40
runs-on : ubuntu-20.04
41
41
steps :
42
42
- name : checkout code
43
43
uses : actions/checkout@v2
44
- - name : style check
44
+ - name : validate coding style and functionality
45
45
run : |
46
46
sudo apt-get install -q -y clang-format-11
47
47
sh .ci/check-format.sh
48
- shell : bash
48
+ bash .ci/build-n-run.sh
49
+ shell : bash
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ obj-m += hello-2.o
3
3
obj-m += hello-3.o
4
4
obj-m += hello-4.o
5
5
obj-m += hello-5.o
6
- obj-m += start .o
7
- obj-m += stop.o
6
+ obj-m += startstop .o
7
+ startstop-objs := start.o stop.o
8
8
obj-m += chardev.o
9
9
obj-m += procfs1.o
10
10
obj-m += procfs2.o
@@ -30,6 +30,8 @@ obj-m += example_mutex.o
30
30
obj-m += bottomhalf.o
31
31
obj-m += ioctl.o
32
32
33
+ PWD := $(CURDIR )
34
+
33
35
all :
34
36
$(MAKE ) -C /lib/modules/$(shell uname -r) /build M=$(PWD ) modules
35
37
You can’t perform that action at this time.
0 commit comments