1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-11-27 11:24:34 -05:00

Remove tests and "none" arch

This commit is contained in:
Braiden Vasco 2017-11-09 08:22:36 +00:00
parent 5516ccbe10
commit 8d964c4ff9
11 changed files with 4 additions and 120 deletions

View file

@ -14,20 +14,14 @@ export MODULES = $(addprefix $(shell pwd)/modules/, dummy1.bin dummy2.bin)
export CFLAGS = -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra -I $(INCLUDE)
SUBDIRS = arch iso libk modules src test
SUBDIRS = arch iso libk modules src
ifeq (none, $(ARCH))
run: test
else
run: run-iso
endif
all: all-kernel
clean: clean-kernel $(addprefix clean-, $(SUBDIRS))
test: run-test
##########
# Kernel #
##########
@ -81,19 +75,6 @@ all-libk:
clean-libk:
make clean -C libk
#########
# Tests #
#########
run-test: all-test
make run -C test
all-test: all-libk
make all -C test
clean-test:
make clean -C test
###########
# Modules #
###########

View file

@ -30,16 +30,7 @@ Build and run
-------------
```sh
./configure x86
./configure
make clean
make run
```
Run tests
---------
```sh
./configure none
make clean
make test
```

View file

@ -1,6 +1,6 @@
export OUTPUT = kernelmq
SUBDIRS = none x86
SUBDIRS = x86
all:
make all -C $(ARCH)

View file

@ -1,12 +0,0 @@
OBJS = main.o
all: $(OUTPUT)
clean:
rm -f $(OUTPUT) $(OBJS)
$(OUTPUT): $(OBJS)
$(CC) -o $(OUTPUT) $(OBJS) $(LIBSRC) $(LIBK)
%.o: %.c
$(CC) -c $< -o $@ -std=gnu99 -Wall -Wextra -I $(INCLUDE)

View file

@ -1,2 +0,0 @@
export ARCH = none
export CCPREFIX =

View file

@ -1,8 +0,0 @@
#include <stdio.h>
int main()
{
printf("Hello, World\n");
return 0;
}

2
configure vendored
View file

@ -3,7 +3,7 @@
ENV="$1"
if [ -z "$ENV" ]; then
ENV='none'
ENV='x86'
fi
CONFIG="arch/$ENV/config.mk"

View file

@ -1,14 +0,0 @@
SUBDIRS = libk
run: $(addprefix run-, $(SUBDIRS))
all: $(addprefix all-, $(SUBDIRS))
clean: $(addprefix clean-, $(SUBDIRS))
run-%: all-%
make run -C $*
all-%:
make all -C $*
clean-%:
make clean -C $*

View file

@ -1,16 +0,0 @@
CFLAGS = -std=gnu99 -Wall -Wextra
BINS = strlen.bin memset.bin
run: all $(addprefix run-, $(BINS))
all: $(BINS)
clean:
rm -f $(BINS)
run-%.bin: %.bin
@./$< && echo "[ OK ] $*" || echo "[FAIL] $*"
%.bin: %.c
$(CC) $< -o $@ $(CFLAGS) -I "$(INCLUDE)" "$(LIBK)"

View file

@ -1,23 +0,0 @@
#include <kernelmq/stdlib.h>
#include <assert.h>
#include <string.h>
int main()
{
char buffer[7];
kmemset(buffer, 0, 1);
assert(strlen(buffer) == 0);
kmemset(buffer, 1, 3);
kmemset(&buffer[3], 0, 4);
assert(strlen(buffer) == 3);
strcpy(buffer, "qwerty");
kmemset(&buffer[2], 'a', 2);
assert(!strcmp(buffer, "qwaaty"));
return 0;
}

View file

@ -1,13 +0,0 @@
#include <kernelmq/stdlib.h>
#include <assert.h>
int main()
{
assert(kstrlen("") == 0);
assert(kstrlen("q") == 1);
assert(kstrlen("qwe rty") == 7);
assert(kstrlen("qwe\0rty") == 3);
return 0;
}