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;
}