Lines Matching full:file
29 # Dumps a file to the test's stdout for debugging purposes.
31 local file="${1}"; shift
33 echo "==== BEGIN ${file}"
34 cat "${file}"
35 echo "==== END ${file}"
38 # Creates a C source file with a single symbol in it.
40 # The file parameter specifies the path to the file to create, WITHOUT the
41 # C extension. Both a source file and a header file are created. Any
47 local file="${1}"; shift
50 mkdir -p "$(dirname ${file})"
51 echo "extern const char *${symbol};" >"${file}.h"
52 echo "const char *${symbol} = \"${file}\";" >"${file}.c"
54 dump_file "${file}.h"
55 dump_file "${file}.c"
58 # Creates a main C source file that references a set of modules.
61 # create_c_module. The generated source file ensures that all the modules
65 # The file parameter specifies the name of the file to create.
70 local file="${1}"; shift
79 echo '#include <stdio.h>' >"${file}"
81 echo "#include \"${module}\"" >>"${file}"
83 echo 'int main(void) {' >>"${file}"
85 echo "printf(\"%s\n\", ${symbol});" >>"${file}"
87 echo 'return 0; }' >>"${file}"
89 dump_file "${file}"
92 # Creates a mk.conf file and points MAKECONF to it.
94 # The first argument specifies the name of the configuration file to
98 # generated configuration file and/or a collection of explicit variable
105 local file="${1}"; shift
107 echo "# Test configuration file" >"${file}"
111 echo "${arg}" >>"${file}"
115 echo "${class}OWN=$(id -un)" >>"${file}"
116 echo "${class}GRP=$(id -gn)" >>"${file}"
122 case "${file}" in
124 MAKECONF="${file}"; export MAKECONF
127 MAKECONF="$(pwd)/${file}"; export MAKECONF
131 dump_file "${file}"