Adjusted automated test after jenkins node update

pull/215/head
Daniele Lacamera 2022-07-15 17:15:00 +02:00
parent d398f6708f
commit 8558f2b1d9
2 changed files with 21 additions and 21 deletions
tools
test-expect-version

View File

@ -24,12 +24,12 @@
*
*/
#define _XOPEN_SOURCE 600
#include <stdio.h> /* standard in/out procedures */
#include <stdlib.h> /* defines system calls */
#include <string.h> /* necessary for memset */
#include <netdb.h>
#include <termios.h>
#include <sys/socket.h> /* used for all socket calls */
#include <netinet/in.h> /* used for sockaddr_in6 */
#include <arpa/inet.h>
@ -37,10 +37,14 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <termios.h>
#include <signal.h>
#include <errno.h>
#ifndef __MACH__
#include <termio.h>
#include <linux/serial.h>
#endif
#define MSGLEN (4 + 4 + 8)
#ifndef UART_DEV
@ -83,16 +87,12 @@ int main(int argc, char** argv)
tcgetattr(serialfd, &tty);
cfsetospeed(&tty, B115200);
cfsetispeed(&tty, B115200);
tty.c_cflag = (tty.c_cflag & ~CSIZE) | (CS8);
tty.c_iflag &= ~(IGNBRK | IXON | IXOFF | IXANY| INLCR | ICRNL);
tty.c_oflag &= ~OPOST;
tty.c_oflag &= ~(ONLCR|OCRNL);
tty.c_cflag &= ~(PARENB | PARODD | CSTOPB);
tty.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
tty.c_iflag &= ~ISTRIP;
tty.c_cc[VMIN] = 0;
tty.c_cc[VTIME] = 5;
tcsetattr(serialfd, TCSANOW, &tty);
cfmakeraw(&tty);
tty.c_cflag |= (CLOCAL | CREAD);
tty.c_cflag &= ~CRTSCTS;
if (tcsetattr(serialfd, TCSANOW, &tty) != 0)
return -1;
alarm(TIMEOUT);

View File

@ -1,7 +1,7 @@
TEST_UPDATE_VERSION?=2
WOLFBOOT_VERSION?=0
EXPVER=tools/test-expect-version/test-expect-version
EXPVER_CMD=$(EXPVER) /dev/ttyS0
EXPVER_CMD=$(EXPVER) /dev/ttyAMA0
BINASSEMBLE=tools/bin-assemble/bin-assemble
SPI_CHIP=SST25VF080B
SPI_OPTIONS=SPI_FLASH=1 WOLFBOOT_PARTITION_SIZE=0x80000 WOLFBOOT_PARTITION_UPDATE_ADDRESS=0x00000 WOLFBOOT_PARTITION_SWAP_ADDRESS=0x80000
@ -85,16 +85,16 @@ test-size: FORCE
#
tpm-mute:
@if ! (test -d /sys/class/gpio/gpio7); then echo "7" > /sys/class/gpio/export || true; fi
@echo "out" >/sys/class/gpio/gpio7/direction
@echo "out" >/sys/class/gpio/gpio7/direction || true
@echo "1" >/sys/class/gpio/gpio7/value || true
tpm-unmute:
@if ! (test -d /sys/class/gpio/gpio7); then echo "7" > /sys/class/gpio/export || true; fi
@echo "in" >/sys/class/gpio/gpio7/direction
@echo "in" >/sys/class/gpio/gpio7/direction || true
testbed-on: FORCE
@if ! (test -d /sys/class/gpio/gpio4); then echo "4" > /sys/class/gpio/export || true; fi
@echo "out" >/sys/class/gpio/gpio4/direction
@echo "out" >/sys/class/gpio/gpio4/direction || true
@echo "0" >/sys/class/gpio/gpio4/value || true
@make tpm-mute
@echo "Testbed on."
@ -102,7 +102,7 @@ testbed-on: FORCE
testbed-off: FORCE
@make tpm-mute
@if ! (test -d /sys/class/gpio/gpio4); then echo "4" > /sys/class/gpio/export || true; fi
@echo "out" >/sys/class/gpio/gpio4/direction
@echo "out" >/sys/class/gpio/gpio4/direction || true
@echo "1" >/sys/class/gpio/gpio4/value || true
@echo "Testbed off."
@ -117,7 +117,7 @@ test-spi-on: FORCE
@echo "10" >/sys/class/gpio/unexport || true
@echo "11" >/sys/class/gpio/unexport || true
@modprobe spi_bcm2835
@modprobe spidev
#@modprobe spidev
test-spi-off: FORCE
@rmmod spi_bcm2835 || true
@ -126,10 +126,10 @@ test-spi-off: FORCE
@echo "9" >/sys/class/gpio/export || true
@echo "10" >/sys/class/gpio/export || true
@echo "11" >/sys/class/gpio/export || true
@echo "in" >/sys/class/gpio/gpio8/direction
@echo "in" >/sys/class/gpio/gpio9/direction
@echo "in" >/sys/class/gpio/gpio10/direction
@echo "in" >/sys/class/gpio/gpio11/direction
@echo "in" >/sys/class/gpio/gpio8/direction || true
@echo "in" >/sys/class/gpio/gpio9/direction || true
@echo "in" >/sys/class/gpio/gpio10/direction || true
@echo "in" >/sys/class/gpio/gpio11/direction || true
@make testbed-on
test-update: test-app/image.bin FORCE