xref: /petsc/src/sys/webclient/tutorials/googledriveupload.c (revision f97672e55eacc8688507b9471cd7ec2664d7f203)
1 
2 /*
3     Run with -google_refresh_token XXX to allow access to your Google Drive or else it will prompt you to enter log in information for Google Drive.
4 */
5 
6 #include <petscsys.h>
7 
8 int main(int argc,char **argv)
9 {
10   char           access_token[512];
11 
12   PetscCall(PetscInitialize(&argc,&argv,NULL,NULL));
13   PetscCall(PetscGoogleDriveRefresh(PETSC_COMM_WORLD,NULL,access_token,sizeof(access_token)));
14   PetscCall(PetscGoogleDriveUpload(PETSC_COMM_WORLD,access_token,"googledriveupload.c"));
15   PetscCall(PetscFinalize());
16   return 0;
17 }
18 
19 /*TEST
20 
21    build:
22      requires: ssl
23 
24    test:
25      TODO: determine how to run this test without making a google refresh token public
26 
27 TEST*/
28