mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-30 21:23:40 +00:00
Change-Id: I4c9b7a937103f3978cbed6629ee4057018b80eae More cleanup. Also allow some tests to run even when TPM is already started. Change-Id: I23558b96a1de55bbeca42dbf2e44f6802a0ec85b Reorganize and standardize behavior of tests. Change-Id: Id32fd09211a72deaa66a3dd0f973d35506ff96f2 BUG=433 TEST=ran all the tests I could run without TPM-free BIOS Review URL: http://codereview.chromium.org/3389004
28 lines
748 B
C
28 lines
748 B
C
/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Shared code for tests.
|
|
*/
|
|
|
|
#include "tlcl.h"
|
|
#include "tlcl_tests.h"
|
|
|
|
const char* resilient_startup = NULL;
|
|
|
|
uint32_t TlclStartupIfNeeded(void) {
|
|
static char* null_getenv = "some string"; /* just a unique address */
|
|
uint32_t result = TlclStartup();
|
|
if (resilient_startup == NULL) {
|
|
resilient_startup = getenv("TLCL_RESILIENT_STARTUP");
|
|
if (resilient_startup == NULL) {
|
|
resilient_startup = null_getenv;
|
|
}
|
|
}
|
|
if (resilient_startup == null_getenv) {
|
|
return result;
|
|
}
|
|
return result == TPM_E_INVALID_POSTINIT ? TPM_SUCCESS : result;
|
|
}
|