Merge "Tag libstatspull and libstatssocket tests as MTS" into rvc-dev
This commit is contained in:
commit
6d99e68e74
3 changed files with 24 additions and 3 deletions
|
|
@ -84,7 +84,15 @@ cc_test {
|
|||
"libstatspull",
|
||||
"libstatssocket",
|
||||
],
|
||||
test_suites: ["general-tests"],
|
||||
test_suites: ["general-tests", "mts"],
|
||||
//TODO(b/153588990): Remove when the build system properly separates
|
||||
//32bit and 64bit architectures.
|
||||
compile_multilib: "both",
|
||||
multilib: {
|
||||
lib64: {
|
||||
suffix: "64",
|
||||
}
|
||||
},
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
|
|
|
|||
|
|
@ -122,5 +122,13 @@ cc_test {
|
|||
"libcutils",
|
||||
"libutils",
|
||||
],
|
||||
test_suites: ["device-tests"],
|
||||
test_suites: ["device-tests", "mts"],
|
||||
//TODO(b/153588990): Remove when the build system properly separates
|
||||
//32bit and 64bit architectures.
|
||||
compile_multilib: "both",
|
||||
multilib: {
|
||||
lib64: {
|
||||
suffix: "64",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,12 @@ using std::vector;
|
|||
// Side-effect: this function moves the start of the buffer past the read value
|
||||
template <class T>
|
||||
T readNext(uint8_t** buffer) {
|
||||
T value = *(T*)(*buffer);
|
||||
T value;
|
||||
if ((reinterpret_cast<uintptr_t>(*buffer) % alignof(T)) == 0) {
|
||||
value = *(T*)(*buffer);
|
||||
} else {
|
||||
memcpy(&value, *buffer, sizeof(T));
|
||||
}
|
||||
*buffer += sizeof(T);
|
||||
return value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue