mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
debug: adding test package for testing and debug
This commit is contained in:
parent
d5a76054e0
commit
2ca94320a8
7
packages/debug/test/build
Executable file
7
packages/debug/test/build
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
|
||||
make -C $BUILD/$1
|
8
packages/debug/test/install
Executable file
8
packages/debug/test/install
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
PKG_DIR=`find $PACKAGES -type d -name $1`
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -f $BUILD/$1/$1 $INSTALL/usr/bin/testprogramm
|
14
packages/debug/test/sources/Makefile
Normal file
14
packages/debug/test/sources/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
CC ?= gcc
|
||||
CFLAGS = -static -Wall -g3 -ggdb3 -Os
|
||||
LDFLAGS =
|
||||
|
||||
SRCS = test.c
|
||||
PROG = test
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
$(PROG): $(SRCS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(PROG)
|
6
packages/debug/test/sources/test.c
Normal file
6
packages/debug/test/sources/test.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
int main(void) {
|
||||
char *msg = "works\n";
|
||||
return write(STDOUT_FILENO, msg, 6) != 6;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user