Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mem.sh fix #41

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/MEM/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
CC = gcc
export LD_LIBRARY_PATH = `git rev-parse --show-toplevel`
CFLAGS = -g -Wall -Werror -I $(LD_LIBRARY_PATH) -std=gnu99 -L $(LD_LIBRARY_PATH) -lresource
CFLAGS = -g -Wall -Werror -I $(LD_LIBRARY_PATH) -std=gnu99 -L $(LD_LIBRARY_PATH)
REXE = mem_test mem_test_cg
MFILES = mem_info.*

mem_test: mem_test.c
$(CC) $(CFLAGS) -o $@ $^
$(CC) $(CFLAGS) -o $@ $^ -lresource

mem_test_cg: mem_test_cg.c
$(CC) $(CFLAGS) -o $@ $^
$(CC) $(CFLAGS) -o $@ $^ -lresource

clean:
rm -rf $(MFILES) $(REXE)
6 changes: 5 additions & 1 deletion tests/MEM/mem.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/sh

# Enable -DTESTING in Makefile and the recompile library - make
make clean

export LD_LIBRARY_PATH=`git rev-parse --show-toplevel`
cd $LD_LIBRARY_PATH/tests/MEM

make clean
make mem_test

cat /proc/meminfo > mem_info.orig
sed -i 's/[ ]\+/ /g' mem_info.orig
./mem_test
Expand Down
Loading