<commit_before>#!/bin/bash

# Copyright (c) 2009 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.

# Load common constants.  This should be the first executable line.
# The path to common.sh should be relative to your script's location.
. "$(dirname "$0")/common.sh"

assert_not_root_user
restart_in_chroot_if_needed $*
get_default_board

# Flags
DEFINE_string build_root "$DEFAULT_BUILD_ROOT"                \
  "Root of build output"
DEFINE_string board "$DEFAULT_BOARD" \
  "Target board for which tests are to be built"

# Parse command line
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"

if [ -z "$FLAGS_board" ]; then
  echo Error: --board required
  exit 1
fi

# Die on error; print commands
set -e

TEST_DIRS="crash pam_google window_manager cryptohome"

sudo TEST_DIRS="${TEST_DIRS}" \
  emerge-${FLAGS_board} chromeos-base/chromeos-unittests<commit_msg>Add some basic tests for metrics_daemon.<commit_after>#!/bin/bash

# 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.

# Load common constants.  This should be the first executable line.
# The path to common.sh should be relative to your script's location.
. "$(dirname "$0")/common.sh"

assert_not_root_user
restart_in_chroot_if_needed $*
get_default_board

# Flags
DEFINE_string build_root "$DEFAULT_BUILD_ROOT"                \
  "Root of build output"
DEFINE_string board "$DEFAULT_BOARD" \
  "Target board for which tests are to be built"

# Parse command line
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"

if [ -z "$FLAGS_board" ]; then
  echo Error: --board required
  exit 1
fi

# Die on error; print commands
set -e

TEST_DIRS="
  crash
  cryptohome
  metrics
  pam_google
  window_manager
  "

sudo TEST_DIRS="${TEST_DIRS}" \
  emerge-${FLAGS_board} chromeos-base/chromeos-unittests
{'fraction_non_alphanumeric': 0.0944921677614957, 'fraction_numerical': 0.007074279939363315, 'mean_word_length': 3.95, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6017645', 'n_tokens_mistral': 661, 'n_tokens_neox': 626, 'n_words': 228}