1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <cerrno>
17 #include <cstdint>
18 #include <cstdio>
19 #include <cstdlib>
20 #include <fcntl.h>
21 #include <string>
22 #include <termios.h>
23 #include <unistd.h>
24 
25 #include <sys/stat.h>
26 
27 #include "appspawn.h"
28 #include "appspawn_msg.h"
29 #include "appspawn_utils.h"
30 #include "appspawn_test_cmder.h"
31 #include "command_lexer.h"
32 #include "json_utils.h"
33 #include "cJSON.h"
34 #include "securec.h"
35 #include "thread_manager.h"
36 
main(int argc,char * const argv[])37 int main(int argc, char *const argv[])
38 {
39     if (argc <= 0) {
40         return 0;
41     }
42 
43     OHOS::AppSpawnModuleTest::AppSpawnTestCommander commander;
44     int ret = commander.ProcessArgs(argc, argv);
45     if (ret == 0) {
46         commander.Run();
47     }
48     return 0;
49 }