Commit 99279adf authored by Andreas Schmidt's avatar Andreas Schmidt

Automate memory tests.

parent a0cd6a2e
Pipeline #44 skipped
......@@ -7,4 +7,12 @@ before_script:
run_tests:
script:
- ./bin/prrtTests
\ No newline at end of file
- ./bin/prrtTests
run_memcheck_sender:
script:
- valgrind --tool=memcheck --track-origins=yes --leak-check=full --error-exitcode=1 ./bin/receiver 5000 &
- PID=$!
- valgrind --tool=memcheck --track-origins=yes --leak-check=full --error-exitcode=1 ./bin/sender
- kill -INT $PID
. wait $PID
\ No newline at end of file
......@@ -16,7 +16,7 @@ int main(int argc, char* const argv[]) {
signal(SIGINT, intHandler);
if(argc != 2) {
printf("Too few arguments.\n");
printf("Receiver: Too few arguments.\n");
return -1;
}
......
......@@ -8,7 +8,7 @@
int main(int argc, char *const argv) {
int i;
if (argc != 1) {
printf("Too few arguments.\n");
printf("Sender: Too few arguments.\n");
}
uint16_t local_port = 6000;
......
......@@ -20,6 +20,12 @@ protected:
PrrtCodingParams_init(cpar);
PrrtBlock_create(encBlock, cpar, 1);
PrrtBlock_create(decBlock, cpar, 1);
free(cpar);
}
virtual void TearDown() {
PrrtBlock_destroy(encBlock);
PrrtBlock_destroy(decBlock);
}
PrrtBlock *encBlock;
......@@ -90,6 +96,8 @@ TEST_F(PrrtBlockTest, VDMCode)
ASSERT_EQ(4, decFec[3][0]);
ASSERT_EQ(9, decFec[3][1]);
ASSERT_EQ(5, decFec[3][2]);
PrrtCoder_destroy(coder);
}
TEST_F(PrrtBlockTest, EncodeDecode)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment